Join the discussion
Question 1/26
Your organization uses a federated identity provider to login to your Oracle Cloud Infrastructure (OCI) environment. As a developer, you are writing a script to automate some operation and want to use OCI CLI to do that. Your security team doesn't allow storing private keys on local machines.
How can you authenticate with OCI CLI?
How can you authenticate with OCI CLI?
Correct Answer: C
Explanation
Token-based authentication for the CLI:
Token-based authentication for the CLI allows customers to authenticate their session interactively, then use theCLI for a single session without an API signing key. This enables customers using an identity provider that is not SCIM-supported to use a federated user account with the CLI and SDKs.
Starting a Token-based CLI Session
To use token-based authenticationfor the CLI on a computer with a web browser:
1. In the CLI, run the following command. This will launch a web browser.
oci session authenticate
2. In the browser, enter your user credentials. This authentication information is saved to the .config file.
Validating a Token
To verify that a token is valid, run the following command:
oci session validate --config-file <path_to_config_file> --profile <profile_name> --auth security_token You should receive a message showing the expiration date for the session.If you receive an error, check your profile settings.
References:
https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/clitoken.htm
Token-based authentication for the CLI:
Token-based authentication for the CLI allows customers to authenticate their session interactively, then use theCLI for a single session without an API signing key. This enables customers using an identity provider that is not SCIM-supported to use a federated user account with the CLI and SDKs.
Starting a Token-based CLI Session
To use token-based authenticationfor the CLI on a computer with a web browser:
1. In the CLI, run the following command. This will launch a web browser.
oci session authenticate
2. In the browser, enter your user credentials. This authentication information is saved to the .config file.
Validating a Token
To verify that a token is valid, run the following command:
oci session validate --config-file <path_to_config_file> --profile <profile_name> --auth security_token You should receive a message showing the expiration date for the session.If you receive an error, check your profile settings.
References:
https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/clitoken.htm
Add Comments
- Other Question (26q)
- Q1. Your organization uses a federated identity provider to login to your Oracle Cloud Infrast...
- Q2. You are developing a polyglot serverless application using Oracle Functions. Which languag...
- Q3. You are developing a serverless application with Oracle Functions. Your function needs to ...
- Q4. You are processing millions of files in an Oracle Cloud Infrastructure (OCI) Object Storag...
- Q5. Which two are benefits of distributed systems?...
- Q6. Which two arerequired to enable Oracle Cloud Infrastructure (OCI) Container Engine for Kub...
- Q7. You have been asked to create a stateful application deployed in Oracle Cloud Infrastructu...
- Q8. How can you find details of the tolerations field for the sample YAML file below? (Exhibit...
- Q9. Which two statements are true for service choreography?...
- Q10. Which is NOT a supported SDK on Oracle Cloud Infrastructure (OCI)?...
- Q11. In a Linux environment, what is the default locations of the configuration file that Oracl...
- Q12. You are building a container image and pushing it to the Oracle Cloud Infrastructure Regis...
- Q13. You have written a Node.js function and deployed it to Oracle Functions. Next, you need to...
- Q14. Which pattern can help you minimize the probability of cascading failures in your system d...
- Q15. Which statement accurately describes Oracle Cloud Infrastructure (OCI) Load Balancer integ...
- Q16. You are implementing logging in your services that will be running in Oracle Cloud Infrast...
- Q17. A pod security policy (PSP) is implemented in your Oracle Cloud Infrastructure Container E...
- Q18. Which concepthe following steps reference Console instructionsCloud Infrastructure Resourc...
- Q19. What is the minimum amount of storage that a persistent volume claim can obtain InOracle C...
- Q20. You are deploying an API via Oracle Cloud Infrastructure (OCI) API Gateway and you want to...
- Q21. What is the difference between blue/green and canary deployment strategies?...
- Q22. Which is NOT a valid option to execute a function deployed on Oracle Functions?...
- Q23. You want to push a new image in the Oracle Cloud Infrastructure (OCI) Registry. Which two ...
- Q24. Who is responsiblefor patching, upgrading and maintaining the worker nodes in Oracle Cloud...
- Q25. A service you are deploying to Oracle infrastructure (OCI) Container En9ine for Kubernetes...
- Q26. You are developing a serverless applicationwith Oracle Functions. You have created a funct...
