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

Some TestDoisController test cases do not pass in CI and have been disabled #364

Open
alexdunnjpl opened this issue Sep 16, 2022 · 3 comments
Assignees

Comments

@alexdunnjpl
Copy link
Contributor

alexdunnjpl commented Sep 16, 2022

πŸ› Describe the bug

(Presumably) due to lack of jwt credentials in the Github Actions test environment's config file, some tests do not pass following #349

πŸ“œ To Reproduce

See integration tests logs

πŸ•΅οΈ Expected behavior

All branch integration tests pass.

🩺 Test Data / Additional context

Affected tests have been disabled in CI with @unittest.skipIf(os.environ.get("CI") == "true", "Test is currently broken in Github Actions workflow. See #364")

βš™οΈ Engineering Details

Need to investigate whether it's legit/simple to add jwt creds to the config, or if another approach is necessary.

@alexdunnjpl
Copy link
Contributor Author

Per @ramesh-maddegoda

[API_AUTHENTICATION]
# Add the issuer of the oauth tokens, for cognito https://cognito-idp/.<aws-region>.amazonaws.com/<userpoolID>
jwt_issuer = https://cognito-idp.us-west-2.amazonaws.com/us-west-2_6cebRMo6g
# Add the entire content of the JSON file at https://cognito-idp/.<aws-region>.amazonaws.com/<userpoolID>/.well-known/jwks.json
json_web_key_set = {"keys":[{"alg":"RS256","e":"AQAB","kid":"W5PfV9Fcm85EsSW/UeCxQWJMzjWwwdI0BCb7+2OnHLg=","kty":"RSA","n":"5YBcCoj53XKUGn1Xg9VVU9MUi--9G5qIGBZEWkpOH88Eb_JiM-awUHZHySqeiA12IhUu5EcGG-UMyz2Wtt_bXpVDss3Nkg5iJa1hkbYAGjhztsHO3ZyPg8skZxJW4QCe7XDsP2VvEyQRM7R1KTQ4XuX7Dp6YkRNmP4VCSqgftlDbt0t-pp8-IZsGHTFwRH3SIko6GenuykBJ3cUSckjXRUKHgTCh7NNi2Ep12w2jmW3Jb_fxjuom4HZgmTq7FDeHA5oiCK5Q7NsCZOoJC4UbetpXfaWok-RJQBE-d8bVgeTtxVkjJeJD8MCV5I0d5L4v4pt05i9Xvhx98WyJU3jIiQ","use":"sig"},{"alg":"RS256","e":"AQAB","kid":"ayPJoLoErO3lSYCAAuDqZCjYlFnbwzE1UdXOboxZyFI=","kty":"RSA","n":"1c3SisbSozOiTCVvlaGIzzYEHkifKR-Jc41XYpd8DSULgYgPDdQUPVSpEwZiA4YxX3U7CGwsXBJEGB1HSL6rMQZytJjt-C-hHsOMeUXuwn7ahurRJXfnjv0jztmtxNHwm2qxhkYV8tyVtCv8bvcJ65tIIyH4lF5ZoQwzgn02Pku9cRjAIJcOdjSylykcGYZDfDugWmf9TtdyITNS8PSagYl86sKUhW9aj1NReWGBDij0PQkkL81yzd3qXQhqotDte63xqVGD82jToBgYo-FtIxD8n8h54pxRDrtgEiYkj0yB4UPEC9pyCpvo1L0ARhrn1u4RdGwvSbqLGNe1_mOxIQ","use":"sig"}]}
jwt_lifetime_seconds = 3600
jwt_algorithm = RS256

config defines the user pool to authenticate against, and the user (in this case, the CI workflow) needs to have an account and authenticate against that pool. Ramesh's config points to the NGAP user pool.

https://github.com/unity-sds/unity-cs/wiki/Getting-Cognito-JWT-Tokens-in-Command-Line

  1. we have to create a Cognito user for CI
  2. Have the user name and password of that user in a Config (preferably something like github secrets)
  3. Use those credentials to get the JWT access token
  4. Add that token as the Authorization header when making a request to doi-service (as "Authorization":"Bearer acces-token)"

@alexdunnjpl
Copy link
Contributor Author

@ramesh-maddegoda has set up user ci-user in NGAP user pool.

Should receive an email shortly.

Change password here and pass on to Jordan.

@alexdunnjpl
Copy link
Contributor Author

The rest of the info is here https://jpl.slack.com/archives/GCGR1R3A4/p1663347277214929

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ToDo
Development

No branches or pull requests

2 participants