Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Allow use private key to be outside of a file #539

Open
GustavoOS opened this issue Nov 2, 2024 · 3 comments
Open

[Feature] Allow use private key to be outside of a file #539

GustavoOS opened this issue Nov 2, 2024 · 3 comments

Comments

@GustavoOS
Copy link

Currently, common.ConfigurationProviderEnvironmentVariables takes a private key path.
Also, the default option looks for the .oci file under a specific folder
Would it be possible to add an option that allows private key string to be used to authenticate?

@jyotisaini
Copy link

Hi @GustavoOS - Can you explain what is the usecase of passing a key string and not the file path ? We do not do that due to security concerns.

@GustavoOS
Copy link
Author

I have a Vercel Function written in Golang that I wish to create a bucket inside Object Storage with auto tiering. As that function is not hosted in OCI, the only way to authenticate it is to have the key inside a secret vault or using Vercel Environment variables.

The reason i have to do it with oracle sdk is because AWS Intelligent tiering maps to standard tier instead of auto tiering when using S3 compatibility API.

From my perspective, either way could solve my problem:

  1. Changing compatibility API so Intelligent Tiering maps to Auto Tiering
  2. Enabling the key to be hosted outside of a file

@ianeal
Copy link

ianeal commented Nov 22, 2024

@GustavoOS You might want to look at the NewRawConfigurationProvider instead. Just lookup the env variables in your code use the following. NOTE: here the privateKey is the contents of a private key file.

provider := common.NewRawConfigurationProvider(
	tenancy,
	user,
	region,
	fingerprint,
	privateKey,
	nil,
)

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

No branches or pull requests

3 participants