shell-plugins icon indicating copy to clipboard operation
shell-plugins copied to clipboard

experimentation oci cli

Open giovannicandido opened this issue 2 years ago • 4 comments

Overview

This is a work in progress not tested yet. I need feedback

Add support for oracle cloud infrastructure command line.

Type of change

  • [x] Created a new plugin
  • [ ] Improved an existing plugin
  • [ ] Fixed a bug in an existing plugin
  • [ ] Improved contributor utilities or experience

Related Issue(s)

  • Resolves: #132

How To Test

I need feedback on how to test this. I use linux in WSL and my 1password desktop app is on windows. Could not find a way to develop plugins in Windows, and couldn't find a way to connect the 1password cli on WSL with the app running in windows.

The instructions is as follows:

Generate a keyfile adding a new api signing file https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm

Get the fingerprint and private key contents, your tenancy ocid and user ocid

Add the plugin as instructions in development and import the values. (not sure if private key needs to be in base64, it is unformated in the import because it gets only first line of certificate)

Changelog

Authenticate the OCI CLI using 1password

giovannicandido avatar Nov 15 '23 20:11 giovannicandido

Hey @giovannicandido, thank you for opening this MR!

Unfortunately, at the time, there is no straight-forward way to test shell plugins via WSL. Is using a Linux VM a viable option for you? We've recently made changes to the prompting experience that imply that system authentication/Windows Hello is no longer required, so in a VM it should be quite easy to test.

Do let us know if we can help with that, and feel free to reach out directly in the Developer Slack workspace!

hculea avatar Jan 10 '24 10:01 hculea

I tested on OSX and it works. There seems to be some nuance on the format of the secret access key if creating manually, but the import generates the field correctly.

adam-mckee avatar Feb 13 '24 01:02 adam-mckee

Hey @giovannicandido, thank you for opening this MR!

Unfortunately, at the time, there is no straight-forward way to test shell plugins via WSL. Is using a Linux VM a viable option for you? We've recently made changes to the prompting experience that imply that system authentication/Windows Hello is no longer required, so in a VM it should be quite easy to test.

Do let us know if we can help with that, and feel free to reach out directly in the Developer Slack workspace!

Right, I will try in a Linux VM.

giovannicandido avatar Feb 26 '24 17:02 giovannicandido

I tested on OSX and it works. There seems to be some nuance on the format of the secret access key if creating manually, but the import generates the field correctly.

Thanks for the test, good to know it works. I will try this one in a Linux VM and polish the code to publish it. The import from local file fallback is not implemented. Maybe it is useful, but I think it deceives the point of using 1Password because I use this to not have key files unencrypted in the file system and have a single place to authenticate.

giovannicandido avatar Feb 26 '24 17:02 giovannicandido