LinuxCommandLibrary

odps-auth

Authenticate to Alibaba Cloud ODPS (MaxCompute)

TLDR

Add a user to the current project

$ add user [username];
copy

Grant a set of authorities to a user
$ grant [action_list] on [object_type] [object_name] to user [username];
copy

Show authorities of a user
$ show grants for [username];
copy

Create a user role
$ create role [role_name];
copy

Grant a set of authorities to a role
$ grant [action_list] on [object_type] [object_name] to role [role_name];
copy

Describe authorities of a role
$ desc role [role_name];
copy

Grant a role to a user
$ grant [role_name] to [username];
copy

SYNOPSIS

odps-auth [options]

PARAMETERS

-ak
    Access Key ID: Specifies the Alibaba Cloud Access Key ID to use for authentication.
This parameter is necessary for authenticating with access keys.

-sk
    Access Key Secret: Specifies the Alibaba Cloud Access Key Secret corresponding to the Access Key ID.
This parameter is necessary for authenticating with access keys.

-e
    Endpoint: Sets the endpoint for connecting to the ODPS service.
This parameter defines the specific service location.

-p
    Project Name: Specifies the ODPS project to be used.
This is useful to set a default project.

-region
    Region: Defines the Alibaba Cloud region.
This is useful to set a default region.

-roleArn
    Role ARN: Defines the role that will be assumed.
Used for Role-Based authentication.

-stsToken
    STS Token: Defines the security token that will be used.
Used for Role-Based authentication.

DESCRIPTION

The `odps-auth` command is a utility used to configure and manage authentication credentials for accessing Alibaba Cloud's Open Data Processing Service (ODPS, also known as MaxCompute). This command helps users securely interact with ODPS resources, such as tables, functions, and projects, from their local machines or within automated scripts. It streamlines the process of setting up authentication, removing the need to manually configure environment variables or configuration files for each session. Proper configuration is crucial for accessing and manipulating data within the ODPS environment. It usually stores your Access Key ID and Access Key Secret or uses RAM roles to allow authorized access to ODPS. The command provides various options to facilitate different authentication scenarios, including basic access key authentication and more advanced role-based authentication methods.

CAVEATS

Improperly configured credentials can lead to unauthorized access to ODPS resources. Store credentials securely and avoid hardcoding them in scripts. It's highly recommended to use Role-Based Authentication whenever possible instead of relying on AccessKeyID/AccessKeySecret.

CONFIGURATION FILE

The `odps-auth` command stores the configuration in a default file (~/.odpscmd_rc) or in an file defined by environment variables. Security of the file should be ensured because it contains sensitive access credentials.

HISTORY

The `odps-auth` command was created as part of the Alibaba Cloud ODPS ecosystem to simplify the process of authenticating client applications and tools with the ODPS service. It evolved from earlier, more manual methods of configuring authentication settings. Its usage has increased with the growing adoption of ODPS for big data processing and analytics.

SEE ALSO

odpscmd(1)

Copied to clipboard