-
Notifications
You must be signed in to change notification settings - Fork 7
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
[auth] Serve both raw (for download) and resigned (for upload) tokens #1362
base: tests/mock-aai
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Don't make changes to files in the base branch unless that one is
main
. Your Base branch is a branch that belongs to another PR. - The root cause of all your mishaps is due to the
OIDCIdentity
struct having rather bad names for what data it holds. It should actually look like this:
type OIDCIdentity struct {
Subject string
Passport []string
RawToken string
ResignedToken string
Fullname string
Email string
EdupersonEntitlement []string
ExpDateRaw string
ExpDateResigned string
}
This reverts commit d69100a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the following commits:
ea0908d : Fix name of the test user for aai mock
d69100a : Use jwtpubkeypath instead of jwtpubkeyurl
c516ed6 : Revert "Use jwtpubkeypath instead of jwtpubkeyurl"
b78c70c : Revert "Fix name of the test user for aai mock"
Rebase this branch on main, should only be your 10 commits by then.
Related issue(s) and PR(s)
This PR closes #1337
Description
This PR allows
auth
to serve both raw and resigned tokens as well as their corresponding s3 config files.This PR is based on the branch
tests/mock-aai
in which the servicemock-aai
is implemented. Nevertheless, the changes of this PR and the changes in the branchtests/mock-aai
are in different folders of code so there's no conflict when merging to the main branch.How to test
setting
AUTH_RESIGNJWT=true
in the file.github/integration/sda-s3-integration.yml
and
server.jwtpubkeypath : "/shared/keys/pub/"
in the config file.github/integration/sda/config.yaml
.then run
When the services are up, visit http://localhost:8801 and login with the
Test User
, check that there are two different tokens and also click the download buttons for two different S3 config files, that is,s3cmd-inbox.conf
ands3cmd-download.conf
.Modify bucket base and use_https for local testing.
For Mac:
For Linux:
Test uploading
5. Test uploading with the config file
s3cmd-inbox.conf
and it should work.s3cmd-download.conf
and it should fail.Test downloading
7. Start the download service by running the following command in the folder
sda-download
get visas failed