Requesting Access with CLI

Learn how request access using the Apono CLI

The Apono CLI enables you to view, request, and receive permission to services, databases, and applications that are centrally managed via Apono.


💡

Since requests for different integrations have specific requirements, we recommend using the following steps:

  1. Use the interactive approach to make an initial integration request.
  2. Create and save an alias with the request command displayed in the CLI.


Prerequisites

ItemDescription
Apono AccountGrantee access to Apono

You can verify that you have access by going to the Apono Portal or contacting your administrator to obtain a user account.
Access Flow GranteeInclusion in at least one Access Flow

Contact your administrator for more information.


Install the Apono CLI

The Apono CLI enables you to make access requests directly from a command line interface.

Follow these steps to install the Apono CLI using Homebrew:

  1. In Terminal, clone the apono-io/tap repository into Homebrew's directory of tapped repositories on your local machine.
    brew tap apono-io/tap
    
  2. Install the Apono CLI.
    brew install apono-cli
    

ℹ️

You can also install the Apono CLI using Scoop.



After installing the Apono CLI, all available commands can be accessed by requesting help at the terminal prompt.

apono -h

Request access

Access request via the Apono CLI

Access request via the Apono CLI


Log in to Apono

Before you can make access requests via the Apono CLI, you must log in to your Apono account.

Follow these steps to log in:

  1. In Terminal, initiate logging in to your Apono account. The Apono UI login screen will open in a new web browser tab.
    apono login
    
  2. In the web browser tab, log in to your Apono account. After successfully logging in to your account, the Authorized page will appear in a new browser tab.
  3. Close both browser tabs.



Make an access request

Although each access request requires different details, the general workflow for all requests is similar.

General workflow for a request

General workflow for a request and resource access


Follow these steps to submit an access request:

  1. In Terminal, start the workflow. The What do you want to do? prompt appears.
    apono
    
  2. Select Request new access and press the Enter key. The Select request type prompt appears.
  3. Select an option and press the Enter key. A prompt appears.
    Request Type Description
    Bundle Access to a defined group of resources

    A bundle of access may be based on a role or specific project needs.
    Integration Access to a specific resource

  1. Select an option for the prompt and for each of the subsequent prompts to request access.

    Each access request requires specific information. However, the last prompt to appear for all access requests is the Enter justification prompt.

    ℹ️

    When making selections for each prompt, note the following:

    • If a specific prompt only has one associated option, that option will automatically be chosen and the next prompt will appear.
    • Use the arrow keys on your keyboard to highlight an option.
    • If a prompt accepts multiple options, use the spacebar to select one or several of the options.

  1. Type a brief explanation to justify the access request and press the Enter key.
  2. Access the resource.

    ℹ️

    Accessing the resource depends upon the approval process:

    • Immediate approval: You will be granted access to the resource. You may be logged in automatically, provided connection instructions, or prompted for login credentials. See: Request and Immediate Access.
    • Manual approval: You must await approval. After approval is granted, you can connect to a resource by following the connection instructions or entering your credentials. See: Manual Approval and Resource Access.


Use Cases


Request and Immediate Access

An engineer needs access to all the Postgres databases in postgresql/dimi delete. SUPERUSER is the only permission level for the Postgres databases.

Follow these steps to submit an access request:

  1. In Terminal, start the workflow. The What do you want to do? prompt appears.
    apono
    
  2. Select Request new access and press Enter. The Select request type prompt appears.
  3. Select Integration and press the Enter key. A Select integration prompt appears.
  4. Select the integration and press the Enter key. Since only one option exists for the resource type, this option is automatically chosen. The Select Database prompt appears.
  5. Select one or several databases and press Enter key. Since only one option exists for the permissions, this option is automatically chosen. The Enter justification prompt appears.
  6. Type a brief explanation to justify the access request and press the Enter key.

    After submitting a request the following information is displayed:
    • Request Command: CLI command for the request that can be used to request access again in the future or to create an alias.
      apono requests create --integration "azure-aks/test" --resource-type "azure-aks-namespace" --permissions "admin" --permissions "edit" --resources "kube-system" --justification "Need access to this AKS namespace"
      
    • Status: Details of the request and its approval status.
    • Select Access Prompt: Prompt to gain access to the resource.

  7. Select the access and press the Enter key. The Select how to use access prompt appears.

    ℹ️

    For some integration workflows, you will not see additional prompts and will be immediately logged in to the resource.

  8. Select an access option and press the Enter key.
    Option Description
    Connect Connects the user directly to the database

    Once you have connected to the database, you can make queries directly from the CLI prompt.
    Instructions Prints instructions to access the database to the screen



Manual Approval

An engineer needs admin and edit permissions for the AKS namespace, test/kube-system on azure-aks/test. This is the only AKS namespace in this environment.

Follow these steps to submit an access request:

  1. In Terminal, start the workflow. The What do you want to do? prompt appears.
    apono
    
  2. Select Request new access and press the Enter key. The Select request type prompt appears.
  3. Select Integration and press the Enter key. A Select integration prompt appears.
  4. Select the integration and press the Enter key. The Select resource type prompt appears.
  5. Select Namespace and press the Enter key. Since only one option exists, this option is automatically chosen. The Select permissions prompt appears.
  6. Select one or several permissions and press the Enter key. The Enter justification prompt appears.
  7. Type a brief explanation to justify the access request and press the Enter key.

After submitting a request the following information is displayed:

  • Request Command: CLI command for the request that can be used to request access again in the future or to create an alias.
    apono requests create --integration "azure-aks/test" --resource-type "azure-aks-namespace" --permissions "admin" --permissions "edit" --resources "kube-system" --justification "Need access to this AKS namespace"
    
  • Status: Details of the request and its approval status. Once a request has been approved, you can connect to a resource. See: Resource Access.



Resource Access

An engineer who was previously granted access to a resource wants to connect to that resource.

Follow these steps to submit an access request:

  1. In Terminal, start the workflow. The What do you want to do? prompt appears.
    apono
    
  2. Select Connect to a resource and press the Enter key. The Select how to use access prompt appears.
  1. Select an access option and press the Enter key.
    Option Description
    Connect Connects the user directly to the database

    Once you have connected to the database, you can make queries directly from the CLI prompt.
    Instructions Prints instructions to access the database to the screen