Project Access

The OLP CLI supports the following:

  • list all users, apps, and groups that have access to a project
  • grant project access to a user, app, or group
  • revoke project access from a user, app, or group

project access list

Retrieves all users, apps, and groups that have access to a project.

olp project access list <project HRN> [command options]

Required parameters:

  • <project HRN> The HRN of the project.

Optional parameters:

  • --limit <max number of entities> Specifies the maximum number of entities returned in the result (100 by default).
  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Display the command's result in JSON format.
  • --quiet Display members' HRNs, each on a new line.

For more information on using credentials and profiles, see Credentials Setup.

Example:

The command below lists all users, apps, and groups that have access to the project:


olp project access list hrn:here-cn:authorization::myrealm:project/my-project-1234 --json

Output:


{"members": [{
    "identityType": "app",
    "member": "hrn:here-cn:account::myrealm:app/F9p0HU3qCqtxnZ3KnH4z",
    "project": "hrn:here-cn:authorization::myrealm:project/my-project-1234",
    "info": {
        "ownerHrn": "hrn:here-cn:account::myrealm:user/HERE-05966c89-aaf1-4ae2-b0e4-3676b3f8b8c3",
        "clientId": "F9p0HU3qCqtxnZ3KnH4z",
        "clientHrn": "hrn:here-cn:account::myrealm:app/F9p0HU3qCqtxnZ3KnH4z",
        "name": "my-app",
        "realm": "myrealm",
        "ownerId": "HERE-05966c89-aaf1-4ae2-b0e4-3676b3f8b8c3"
    }
}]}

project access grant

Grants project access to a user, app, or group.

olp project access grant <project HRN> [command options]

Required parameters:

  • <project HRN> The HRN of the project.

Optional parameters:

  • --app <appID1 appID2 ...> The list of application IDs you want to grant project access to, separated by space.
  • --user <userID1 userID2 ...> The list of user IDs you want to grant project access to, separated by space. This information can be found in the .here/credentials.properties file, in the user's home directory, or via your profile.
  • --group <groupID1 groupID2 ...> The list of group IDs you want to grant project access to, separated by space.
  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --quiet Display an empty output skipping additional information.

Note

You must specify at least one of these options – --app, --user, or --group.

For more information on using credentials and profiles, see Credentials Setup.

Example:

The command below grants project access to a user, app, and group:

Linux
Windows
olp project access grant hrn:here-cn:authorization::myrealm:project/my-project-1234 \
   --app F9p0HU3qCqtxnZ3KnH4z \
   --user HERE-05966c89-aaf1-4ae2-b0e4-3676b3f8b8c3 \
   --group GROUP-859ddd60-78f2-4ad2-865d-7351b01ff008
olp project access grant hrn:here-cn:authorization::myrealm:project/my-project-1234 ^
   --app F9p0HU3qCqtxnZ3KnH4z ^
   --user HERE-05966c89-aaf1-4ae2-b0e4-3676b3f8b8c3 ^
   --group GROUP-859ddd60-78f2-4ad2-865d-7351b01ff008

Output:


User HERE-05966c89-aaf1-4ae2-b0e4-3676b3f8b8c3 has been granted access to the project hrn:here-cn:authorization::myrealm:project/my-project-1234
Application F9p0HU3qCqtxnZ3KnH4z has been granted access to the project hrn:here-cn:authorization::myrealm:project/my-project-1234
Group GROUP-859ddd60-78f2-4ad2-865d-7351b01ff008 has been granted access to the project hrn:here-cn:authorization::myrealm:project/my-project-1234

project access revoke

Revokes project access from a user, app, or group.

olp project access revoke <project HRN> [command options]

Required parameters:

  • <project HRN> The HRN of the project.

Optional parameters:

  • --app <appID1 appID2 ...> The list of application IDs you want to revoke project access from, separated by space.
  • --user <userID1 userID2 ...> The list of user IDs you want to revoke project access from, separated by space. This information can be found in the .here/credentials.properties file, in the user's home directory, or via your profile.
  • --group <groupID1 groupID2 ...> The list of group IDs you want to revoke project access from, separated by space.
  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --quiet Display an empty output skipping additional information.

Note

You must specify at least one of these options – --app, --user, or --group.

For more information on using credentials and profiles, see Credentials Setup.

Example:

The command below revokes project access from a user, app, and group:

Linux
Windows
olp project access revoke hrn:here-cn:authorization::myrealm:project/my-project-1234 \
   --app F9p0HU3qCqtxnZ3KnH4z \
   --user HERE-05966c89-aaf1-4ae2-b0e4-3676b3f8b8c3 \
   --group GROUP-859ddd60-78f2-4ad2-865d-7351b01ff008
olp project access revoke hrn:here-cn:authorization::myrealm:project/my-project-1234 ^
   --app F9p0HU3qCqtxnZ3KnH4z ^
   --user HERE-05966c89-aaf1-4ae2-b0e4-3676b3f8b8c3 ^
   --group GROUP-859ddd60-78f2-4ad2-865d-7351b01ff008

Output:


User HERE-05966c89-aaf1-4ae2-b0e4-3676b3f8b8c3 has been revoked access to the project hrn:here-cn:authorization::myrealm:project/my-project-1234
Application F9p0HU3qCqtxnZ3KnH4z has been revoked access to the project hrn:here-cn:authorization::myrealm:project/my-project-1234
Group GROUP-859ddd60-78f2-4ad2-865d-7351b01ff008 has been revoked access to the project hrn:here-cn:authorization::myrealm:project/my-project-1234

results matching ""

    No results matching ""