Skip to content

feat(IAM Authenticator): add support for optional 'scope' property #80

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

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

jorge-ibm
Copy link
Contributor

The IAM /identity/token (get token) operation supports an optional "scope" form parameter which can be used to obtain an IAM access token having a limited set of scopes in this it can be used.

This commit adds support for the "Scope" field within the IamTokenManager class. If set, the value of this field is sent as the "scope" form param in the "get token" request body when obtaining an access token.

ref: https://github.ibm.com/arf/planning-sdk-squad/issues/2167

@codecov
Copy link

codecov bot commented Sep 17, 2020

Codecov Report

Merging #80 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #80      +/-   ##
==========================================
+ Coverage   97.97%   98.00%   +0.02%     
==========================================
  Files          18       18              
  Lines         643      651       +8     
==========================================
+ Hits          630      638       +8     
  Misses         13       13              
Impacted Files Coverage Δ
ibm_cloud_sdk_core/get_authenticator.py 100.00% <ø> (ø)
...cloud_sdk_core/authenticators/iam_authenticator.py 96.87% <100.00%> (+0.20%) ⬆️
ibm_cloud_sdk_core/iam_token_manager.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d41c9d8...2e776c2. Read the comment docs.

@jorge-ibm jorge-ibm force-pushed the feat/iam-scope branch 2 times, most recently from dc204da to 8b0659f Compare September 17, 2020 19:04
Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

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

LGTM

# Service2 configured with IAM w/scope
SERVICE_2_AUTH_TYPE=iam
SERVICE_2_APIKEY=V4HXmoUtMjohnsnow=KotN
Copy link
Member

Choose a reason for hiding this comment

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

No matter what @dpopp07 says, I'm ok with you spelling this "john" instead of "jon" :)

@jorge-ibm jorge-ibm merged commit 316c3de into master Sep 18, 2020
@ibm-devx-automation
Copy link

🎉 This PR is included in version 3.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@padamstx padamstx deleted the feat/iam-scope branch November 10, 2020 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants