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

OAuth Browsable API Login #188

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5f8e3ae
Added Browsable API login using OAuth
jhazentia Dec 18, 2020
837206d
add OAUTH_AUTHORIZATION_URL
jhazentia Dec 18, 2020
9efb757
updated test fixtures, oauth session tests
jhazentia Jan 4, 2021
6aae328
add authorization flow test
jhazentia Jan 8, 2021
05ad1d6
cleanup
jhazentia Jan 8, 2021
7d900e5
dynamic base template log in link
jhazentia Jan 11, 2021
5c3dde7
Added oauth session tests
jhazentia Jan 12, 2021
82254d9
cleanup and fix logout, templates
jhazentia Jan 14, 2021
27d2a37
Merge 'master' into oauth-login
jhazentia Jan 14, 2021
67fa3b1
fix formatting
jhazentia Jan 15, 2021
9f6baf0
update static files
jhazentia Jan 21, 2021
d704b40
fix api template, session settings
jhazentia Jan 22, 2021
b9e4b2c
store email from token; improve tests, logging, settings
jhazentia Jan 25, 2021
2829c2e
delete token if authentication fails, remove log message
jhazentia Jan 26, 2021
168764f
verify oauth callback request origin
jhazentia Jan 26, 2021
c69dffb
test oauth callback origin check, skip check for mock sensor
jhazentia Jan 27, 2021
b6aec25
remove empty file
jhazentia Jan 27, 2021
594580f
remove commented out code
jhazentia Jan 27, 2021
3acaa7e
remove commented out code
jhazentia Jan 27, 2021
0b5c5d0
new test client for oauth, new tests, check uid, remove oauth callbac…
jhazentia Mar 5, 2021
0f5454b
nginx config add client cert dn
jhazentia Mar 5, 2021
5fd832a
removed certs, updated readme, tests create temp certs, improved tests
jhazentia Mar 18, 2021
1d51792
Updated README security information
jhazentia Mar 19, 2021
6792496
consolidated readme security section, misc readme improvements
jhazentia Mar 23, 2021
3180f8a
update nginx version, small readme updates
jhazentia Mar 23, 2021
bb8f57e
Updated documentation, fixed client id check
jhazentia Mar 30, 2021
08ac37d
update README
jhazentia May 12, 2021
3871fed
Merge branch 'master' of https://github.com/NTIA/scos-sensor into oau…
jhazentia May 12, 2021
2079f0d
cleanup conftest from merge
jhazentia May 12, 2021
3bc0efd
uncomment scos-actions in requirements
jhazentia May 13, 2021
c71cfd9
fix uid parse, update readme, add exception, fix env.template file names
jhazentia May 13, 2021
1cb7af4
enable same-origin referrer headers for csrf
jhazentia May 14, 2021
2f536a7
fix formatting
jhazentia May 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .ml_style.rb
Expand Up @@ -3,5 +3,6 @@
# Enable all rules by default
all

rule 'MD013', :line_length => 88
rule 'MD013', :line_length => 88, :code_blocks => false
rule 'MD007', :indent => 3
rule 'MD024', :allow_different_nesting => true
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -29,5 +29,6 @@ before_script:
script:
- black --check ./src
- tox -c ./src/tox.ini -e coverage
- tox -c ./src/tox.ini -e oauth
- docker-compose logs
- docker ps | grep api | grep -q healthy
301 changes: 212 additions & 89 deletions README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions configs/certs/README.md
@@ -0,0 +1,3 @@
# Certs

Add SSL certificates and JWT public key here.
14 changes: 0 additions & 14 deletions configs/certs/test/jwt_pubkey.pem

This file was deleted.

32 changes: 0 additions & 32 deletions configs/certs/test/scos_test_ca.crt

This file was deleted.

131 changes: 0 additions & 131 deletions configs/certs/test/sensor01.pem

This file was deleted.

51 changes: 0 additions & 51 deletions configs/certs/test/test_bad_private_key.pem

This file was deleted.

14 changes: 0 additions & 14 deletions configs/certs/test/test_bad_pubkey.pem

This file was deleted.

51 changes: 0 additions & 51 deletions configs/certs/test/test_private_key.pem

This file was deleted.

14 changes: 0 additions & 14 deletions configs/certs/test/test_pubkey.pem

This file was deleted.

2 changes: 2 additions & 0 deletions docker-compose.yml
Expand Up @@ -48,6 +48,8 @@ services:
- MAX_DISK_USAGE
- MOCK_RADIO
- MOCK_RADIO_RANDOM
- MAX_TASK_RESULTS
- OAUTH_AUTHORIZATION_URL
- OAUTH_TOKEN_URL
- PATH_TO_CLIENT_CERT
- PATH_TO_JWT_PUBLIC_KEY
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-nginx
@@ -1,4 +1,4 @@
FROM nginx:1.17-alpine
FROM nginx:1.19-alpine

RUN mkdir -p /var/www/scos-sensor/static
COPY --chown=nginx:nginx ./src/static/ /var/www/scos-sensor/static/
Expand Down