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

Ability to renew aws credentials without application restart #4

Closed
IskandarovRost opened this issue Jan 31, 2020 · 2 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@IskandarovRost
Copy link

Not sure about system variables or Java properties, But it seems it could be simply implemented for ~/.aws/credentials.

Environment

  • Platform version: 7.2-beta1

Description of the bug or enhancement

  • Minimal reproducible example
  1. Create ~/.aws/credentials file with some incorrect or outdated AIM keys in [default] profile

image

  1. in app.properties define some existent bucket/region
    do not define credentials there! This will activate default credentials provider
cuba.amazonS3.region = us-west-1
cuba.amazonS3.bucket = cuba-the-best
  1. Start the application

  2. Open Administration -> External files. And try to upload\download something: ensure it does not work

  3. Then correct ~/.aws/credentials
    image

  4. Open Administration -> External files. And try to upload\download something: check if ot starts working

  • Expected behavior
    The credentials are renewed - read from ~/.aws/credentials.

  • Actual behavior
    The credentials are renewed only after the application re-start.
    image

@soraksh
Copy link
Contributor

soraksh commented Feb 5, 2020

Added AmazonS3Manager MBean with refreshS3Client() method. It will refresh S3Client with current properties and credentials will be reloaded from file if needed (note that data from system variables or Java properties won't be reloaded).

@IskandarovRost
Copy link
Author

The Bean method could be scheduled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants