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

How to proactively check user permissions #1226

Closed
danotorrey opened this issue Apr 24, 2019 · 2 comments
Closed

How to proactively check user permissions #1226

danotorrey opened this issue Apr 24, 2019 · 2 comments

Comments

@danotorrey
Copy link

danotorrey commented Apr 24, 2019

Question: We are building integrations with several AWS services using this SDK. Certain SDK features require very specific permissions to be present in order to function (for example: Kinesis stream subscription, which requires Kinesis and DynamoDB permissions https://docs.aws.amazon.com/streams/latest/dev/kcl-migration.html).

We would like to proactively check if a user has the needed permissions when they provide us their credentials (to avoid having our users hit a runtime error if they are missing a permission). Does the SDK support a way to do check if a permission is present without requiring the user to add explicit IAM permissions? Even a check like client.userHasPermission( "kinesis:GetRecords") would be enough.

Your Environment

  • AWS Java SDK version used: Latest
  • JDK version used: 8
  • Operating System and version: macOS
@danotorrey danotorrey changed the title Proactively check user permissions How to proactively check user permissions Apr 24, 2019
@varunnvs92
Copy link
Contributor

By Kinesis stream subscription, do you mean using KCL library? It is not owned by the SDK team.

For SDK low-level APIs, you generally only need to add IAM permissions for that particular service. Incase if there are APIs that require multiple permissions, SDK doesn't have that information during client generation and so we don't have a feature you are asking for.

@danotorrey
Copy link
Author

@varunnvs92 Fantastic point on KCL. I had forgotten that KCL it is a separate library. Makes sense.

We were looking for a "health check" type of operation that we could execute to verify that a particular credential set are valid and include authorization to the needed service (to avoid a runtime exception during operation of our service later due to missing permissions). It looks like we will probably need to perform a test execution of each needed AWS SDK service at the time when credentials are provided in order to verify that they work.

aws-sdk-java-automation pushed a commit that referenced this issue Mar 16, 2021
Exclude mediatailor from backwards-compatability check as they are releasing breaking change
This was referenced Mar 16, 2021
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