Which THREE steps are required to properly authenticate a script against the Cisco Adaptive Security Appliance (ASA) REST API?
Trap 1: Configure the ASA to allow API access via 'api-server enable' in…
This is a prerequisite, not a step in the programmatic authentication process itself.
Trap 2: Use Basic Auth in every request instead of a token.
Basic Auth is generally deprecated or not the primary method for the REST API session lifecycle.
- A
Configure the ASA to allow API access via 'api-server enable' in the CLI.
Why wrong: This is a prerequisite, not a step in the programmatic authentication process itself.
- B
Send a logout request to /api/logout when the session is complete.
Resource management requires explicit session termination.
- C
Include the token in the 'Authorization: Bearer' header for subsequent calls.
Bearer authentication is the standard mechanism for the ASA REST API.
- D
Perform a POST request to /api/login to retrieve the access token.
Authenticating via the login endpoint is the mandatory first step.
- E
Use Basic Auth in every request instead of a token.
Why wrong: Basic Auth is generally deprecated or not the primary method for the REST API session lifecycle.