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

Implement support for ServiceAccount auth #29

Closed
the-avant-it opened this issue Nov 3, 2024 · 3 comments
Closed

Implement support for ServiceAccount auth #29

the-avant-it opened this issue Nov 3, 2024 · 3 comments

Comments

@the-avant-it
Copy link

Currently you can only use Metadata and OAuth token for auth. Metadata is not applicable for all use cases since it requires your service to run on Yandex Cloud, but OAuth gets expired after one year with is not good also. So service account auth option since it has no expiration problem and not coupled to YC's infrastructure

@the-avant-it
Copy link
Author

May be, for now, there is way I can request new oauth token to renew it from code automatically?

@nikolaymatrosov
Copy link
Contributor

Please avoid using OAuth tokens for any type of automation. Instead, it's recommended to utilize a service account with an authorized key. Here are a few approaches to consider:

  1. Implement your own ICredentialsProvider to exchange a JWT token, signed by the authorized private key, for access.
  2. Use a third-party package that provides this functionality, such as YandexCloud.IamJwtCredentials.
  3. Alternatively, you may wait for the merge of pull request Support authorized key #27, which will add this functionality to the SDK.

These methods ensure secure and efficient authorization for automated processes.

@the-avant-it
Copy link
Author

Use a third-party package that provides this functionality, such as YandexCloud.IamJwtCredentials.

Looks like what I need, thank you!

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

2 participants