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

api: expose gpg fingerprint of source #4436

Merged
merged 3 commits into from
May 14, 2019
Merged

Conversation

redshiftzero
Copy link
Contributor

Status

Ready for review

Description of Changes

Fixes #3911 (implemented to unblock a simple solution to freedomofpress/securedrop-client#363)

Testing

  1. make -C securedrop dev

  2. Get API token (replacing 2FA token below with the correct token):

curl -X POST -H "Content-Type: application/json" --data '{"username":"journalist","passphrase":"correct horse battery staple profanity oil chewy","one_time_code":"123456"}' 127.0.0.1:8081/api/v1/token
  1. Verify you see the fingerprint in the key object for a source:
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token MyTokenFromResponseAboveGoesHere" 127.0.0.1:8081/api/v1/sources

Deployment

None, will be deployed via securedrop-app-code package to all instances

Checklist

If you made changes to the server application code:

  • Linting (make ci-lint) and tests (make -C securedrop test) pass in the development container

If you made non-trivial code changes:

  • I have written a test plan and validated it for this PR

If you made changes to documentation:

  • Doc linting (make docs-lint) passed locally

@codecov-io
Copy link

Codecov Report

Merging #4436 into develop will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4436      +/-   ##
===========================================
- Coverage    83.76%   83.72%   -0.04%     
===========================================
  Files           44       44              
  Lines         2950     2956       +6     
  Branches       321      321              
===========================================
+ Hits          2471     2475       +4     
- Misses         402      404       +2     
  Partials        77       77
Impacted Files Coverage Δ
securedrop/securedrop/models.py 92.63% <0%> (-0.49%) ⬇️

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 ff00f4c...4ff62ad. Read the comment docs.

Copy link
Contributor

@heartsucker heartsucker left a comment

Choose a reason for hiding this comment

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

Followed the test plan, and additionally imported a key to a GPG keyring and confirmed that the fingerprint matches.

@heartsucker heartsucker merged commit d7cb9d1 into develop May 14, 2019
@heartsucker heartsucker deleted the api-expose-gpg-fingerprint branch May 14, 2019 09:28
@eloquence eloquence added this to the 0.13.0 milestone May 14, 2019
@redshiftzero redshiftzero changed the title [api] expose gpg fingerprint of source api: expose gpg fingerprint of source May 16, 2019
@rmol rmol mentioned this pull request May 22, 2019
17 tasks
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

Successfully merging this pull request may close these issues.

Include fingerprint in the key object in a Source response
4 participants