Skip to content

metadata: add get_public_keys method for Oracle Cloud IMDSv2 service - #226

Merged
ader1990 merged 1 commit into
cloudbase:masterfrom
kulikjak:oci-get_public_keys
Nov 19, 2026
Merged

ader1990 merged 1 commit into
cloudbase:masterfrom
kulikjak:oci-get_public_keys

Conversation

@kulikjak

Copy link
Copy Markdown
Contributor

In order to use SetUserSSHPublicKeysPlugin with OCI, get_public_keys method needs to be added to Oracle Cloud IMDSv2 service.

https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/gettingmetadata.htm#metadata-keys

Tested in OCI with custom images and all the different methods of adding public key/keys.

@ader1990

Copy link
Copy Markdown
Member

Hello, thanks for the PR, LGTM.

Can you please add the required bit to the https://github.com/cloudbase/cloudbase-init-test-resources/tree/master/oracle/metadata in a PR so that the opc/%s/instance/metadata/ssh_authorized_keys can be exercised in the functional tests? I will first merge your https://github.com/cloudbase/cloudbase-init-test-resources PR and then we can rerun the cloudbase-init github actions.

Thanks.

@kulikjak

Copy link
Copy Markdown
Contributor Author

Sure, let me check what needs to be done there. Thank you

@kulikjak

Copy link
Copy Markdown
Contributor Author

I created cloudbase/cloudbase-init-test-resources#21 - hopefully that is all that's needed.

@ader1990 ader1990 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you can please squash the two commits to retrigger the tests with the new test resources.

In order to use SetUserSSHPublicKeysPlugin with OCI, get_public_keys method
needs to be added to Oracle Cloud IMDSv2 service.

Signed-off-by: Jakub Kulik <jakub.kulik@oracle.com>
@kulikjak
kulikjak force-pushed the oci-get_public_keys branch from f7c7eb3 to 6b38904 Compare November 19, 2026 13:41
@kulikjak

Copy link
Copy Markdown
Contributor Author

Still the pip audit issue - should I also update the dependencies to later fixed versions or is that not a good idea in unrelated PR?

@ader1990

Copy link
Copy Markdown
Member

Still the pip audit issue - should I also update the dependencies to later fixed versions or is that not a good idea in unrelated PR?

All good with this PR, thanks! I will fix the audit issue in a subsequent PR.

@ader1990
ader1990 merged commit d8a3466 into cloudbase:master Nov 19, 2026
1 of 6 checks passed
@kulikjak

Copy link
Copy Markdown
Contributor Author

Thank you for the guidance and for the merge.

@ader1990

Copy link
Copy Markdown
Member

Thanks for the contribution, much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants