Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Override email privacy using notification service token #252

Merged
merged 5 commits into from
Jan 9, 2018
Merged

Override email privacy using notification service token #252

merged 5 commits into from
Jan 9, 2018

Conversation

sbose78
Copy link
Member

@sbose78 sbose78 commented Jan 9, 2018

Partially fixes fabric8-services/fabric8-notification#52

TODO

  • Add tests
  • Update GET /api/users/<ID> API

How to test

  1. Get service account token:
curl --request POST   -d "grant_type=client_credentials&client_id=4c34f6d4-f00b-487b-9a1f-e7d1adba6866&client_secret=secret"  --url http://localhost:8089/api/token  
  1. Pass token in the request
curl --header "authorization: bearer $token" http://localhost:8089/api/users/7587730b-a4c0-4023-aa3a-dde91a3f5fd5

@fabric8cd
Copy link

@sbose78 snapshot fabric8-auth image is available for testing. docker pull docker.io/fabric8/fabric8-auth:SNAPSHOT-PR-252-1

@codecov
Copy link

codecov bot commented Jan 9, 2018

Codecov Report

Merging #252 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #252      +/-   ##
==========================================
+ Coverage   47.97%   47.97%   +<.01%     
==========================================
  Files          67       67              
  Lines        6750     6751       +1     
==========================================
+ Hits         3238     3239       +1     
  Misses       3226     3226              
  Partials      286      286
Impacted Files Coverage Δ
controller/users.go 74.02% <100%> (+0.04%) ⬆️
configuration/configuration.go 77.23% <0%> (ø) ⬆️

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 cacddba...efa60d1. Read the comment docs.

@sbose78 sbose78 requested a review from alexeykazakov January 9, 2018 18:01
@sbose78 sbose78 changed the title Override email privacy Override email privacy using notification service token Jan 9, 2018
@fabric8cd
Copy link

@sbose78 snapshot fabric8-auth image is available for testing. docker pull docker.io/fabric8/fabric8-auth:SNAPSHOT-PR-252-2

@fabric8cd
Copy link

@sbose78 snapshot fabric8-auth image is available for testing. docker pull docker.io/fabric8/fabric8-auth:SNAPSHOT-PR-252-3

Copy link
Contributor

@alexeykazakov alexeykazakov left a comment

Choose a reason for hiding this comment

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

I simplified our default secrets for SAs a bit. And I also added them to the comment in configuration.go so we don't have to guess what secrets we used to generate the hashes ;)

@alexeykazakov alexeykazakov merged commit ffb7c61 into fabric8-services:master Jan 9, 2018
@sbose78
Copy link
Member Author

sbose78 commented Jan 10, 2018

Excellent, thank you very much @alexeykazakov :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use service account token issued by Auth to get user's email from Auth service
3 participants