Purpose
Configure OCI CLI credentials in an interactive manner. It opens up a login window in your web browser in which you authenticate with your credentials against an identity domain.
Install last OCI CLI version
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"
Issue command
MacBook-Pro:~ javiermugueta$ oci session authenticate Enter a region (e.g. ca-toronto-1, eu-frankfurt-1, uk-london-1, us-ashburn-1, us-gov-ashburn-1, us-gov-chicago-1, us-gov-phoenix-1, us-langley-1, us-luke-1, us-phoenix-1): eu-frankfurt-1 Please switch to newly opened browser window to log in!
Completed browser authentication process! Enter the name of the profile you would like to create: tef Config written to: /Users/javiermugueta/.oci/config Try out your newly created session credentials with the following example command: oci iam region list --config-file /Users/javiermugueta/.oci/config --profile tef --auth security_token MacBook-Pro:~ javiermugueta$ oci session validate --profile tef --auth security_token Session is valid until 2019-04-08 22:56:48
MacBook-Pro:~ javiermugueta$ oci session terminate --profile tef --auth security_token Successfully removed profile: tef from config: /Users/javiermugueta/.oci/config
That’s all!
Enjoy 😉
Hello,
I just made those action, but I get from command “oci session authenticate” an url with a param called redirect_uri, that “contains localhost:8081” so after I use the URL and perform the authentication I am redirectred to localhost with a long uri, rather than getting “authorization complete” …
I am stuck there for now..
LikeLike
my bad , i was attempting to do it in a remote system, while I needed to follow the link in same system browser….
LikeLike
🙂 you got it! Thanks for following!
LikeLike