Skip to content

Commit dc670fc

Browse files
Merge branch 'staging' into prod
2 parents 0483c91 + ea7eb87 commit dc670fc

26 files changed

+2404
-207
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,9 @@ venv.bak/
103103

104104
# mypy
105105
.mypy_cache/
106+
107+
# defualt config
108+
config-local.json
109+
110+
# MacOS
111+
*.DS_Store

CHANGELOG.md

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,86 @@
22
All notable changes to this project will be documented in this file.
33

44

5-
## 1.6.0 - 2024-02-06 (estimated)
5+
## 1.8.2 - 2024-02-28
6+
### Breaking Changes:
7+
- None
8+
9+
### New features:
10+
- 100% tests coverage aside from V2 endpoints
11+
- Now grabbing uid from tokens if DN not set by CN for tenant
12+
- Introduced OIDC support with jwks endpoints and dedicated oidc response endpoints.
13+
- Now works better with Jenkins
14+
15+
### Bug Fixes:
16+
- None
17+
18+
19+
## 1.8.0 - 2024-12-04
20+
### Breaking Changes:
21+
- None
22+
23+
### New features:
24+
- Change help message per tenant
25+
26+
### Bug Fixes:
27+
- Release for 1.8.0
28+
29+
30+
## 1.7.0 - 2024-09-13
31+
### Breaking Changes:
32+
- None
33+
34+
### New features:
35+
- None
36+
37+
### Bug Fixes:
38+
- Release for 1.7.0
39+
40+
41+
## 1.6.3 - 2024-08-28
42+
### Breaking Changes:
43+
- None
44+
45+
### New features:
46+
- This release makes some minor updates to the TACC MFA login page.
47+
- Add SMS support to MFA authentication workflow (need to update tenant config with JWT for PIdea).
48+
49+
### Bug Fixes:
50+
- None
51+
52+
53+
## 1.6.2 - 2024-06-18
54+
### Breaking Changes:
55+
- None
56+
57+
### New features:
58+
- None
59+
60+
### Bug Fixes:
61+
- This minor release updates Authenticator to the latest tapisservice Python package, 1.6.0
62+
(previously it was 1.4.0). See issue #70.
63+
64+
65+
## 1.6.1 - 2024-05-21
66+
### Breaking Changes:
67+
- None
68+
69+
### New features:
70+
- None
71+
72+
### Bug Fixes:
73+
- This release changes the behavior of the limit and offset paging query parameters in the Profiles API so that,
74+
whenever an offset value is sent that is larger that the size of the collection, no records are returned.
75+
Prior to this release, whenever an offset larger than the collection was sent, the query would "wrap" around
76+
and send results from the start of the collection.
77+
- Since LDAP DNs are almost always case insensitive, usernames that are the same up to case are equivalent
78+
for binding. This change updates the check of a username/password combination to reject any username that
79+
contains uppercase letters. This prevents an issue where users could authenticate with different usernames
80+
that are the same up to case and retrieve JWTs with different subjects. (See issue #69).
81+
82+
83+
84+
## 1.6.0 - 2024-02-06
685

786
### Breaking Changes:
887
- None

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# image: tapis/authenticator
2-
FROM tapis/flaskbase:1.4.0
2+
FROM tapis/flaskbase:1.7.0
33

44
COPY requirements.txt /home/tapis/requirements.txt
55
RUN pip install -r /home/tapis/requirements.txt
66

77
# give tapis permissions to write to tapipy -- this is important if you want tapipy to download more
88
# recent specs.
9-
RUN chmod -R a+w /usr/local/lib/python3.7/site-packages/tapipy/
9+
RUN chmod -R a+w /usr/local/lib/python3.8/site-packages/tapipy/
1010

1111
COPY configschema.json /home/tapis/configschema.json
1212
COPY config-local.json /home/tapis/config.json

Dockerfile-migrations

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# image: tapis/authenticator-migrations
2-
from tapis/authenticator
2+
FROM tapis/authenticator
33

44
RUN pip install --upgrade alembic==1.10.4
5-
RUN pip install --upgrade Flask-Migrate
5+
RUN pip install --upgrade Flask-Migrate==4.0.7
66

77
COPY migrations /home/tapis/migrations
88

99
ENV MIGRATIONS_RUNNING=True
1010

11-
User root
11+
USER root
1212
RUN chown -R tapis:tapis /home/tapis
1313
USER tapis
1414

Dockerfile-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Image: tapis/authenticator-tests
2-
from tapis/authenticator
2+
FROM tapis/authenticator
33

44
USER root
55
ADD tests-requirements.txt /home/tapis/tests-requirements.txt

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77

88

99
# it is required that the operator export API_NAME=<name_of_the_api> before using this makefile/
10-
ifndef API_NAME
11-
-include .env
12-
endif
10+
# default to authenticator
11+
API_NAME ?=authenticator
1312
api=${API_NAME}
1413

1514
cwd=$(shell pwd)
@@ -30,7 +29,7 @@ build: build.api build.migrations build.test
3029

3130
# ----- run tests
3231
test: build.test
33-
cd $(cwd); touch service.log; chmod a+w service.log; docker-compose run $(api)-tests;
32+
cd $(cwd); touch service.log; chmod a+w service.log; docker-compose run -e MFA_GEN_CODE=$(MFA_GEN_CODE) $(api)-tests;
3433

3534
# ----- shutdown the currently running services
3635
down:
@@ -42,7 +41,7 @@ clean: down
4241

4342
# ----- start databases
4443
run_dbs: build.api down
45-
cd $(cwd); docker-compose up -d postgres; docker-compose up -d authenticator-ldap
44+
cd $(cwd); docker-compose --compatibility up -d postgres; docker-compose up -d authenticator-ldap
4645

4746
# ----- connect to db as root
4847
connect_db:

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ First, make sure the following passwords are set correctly.
1313
in develop.
1414
2. Within ``docker-compose.yml``, update the ``LDAP_ROOTPASS`` to match the ``password`` key in the secret ``ldap.tapis-dev`` stored in SK.
1515

16-
#### Working With Secrets in the SK ####
17-
We are now storing LDAP secrets within the SK. To retrieve them, use the Python SDK with a token representing the
16+
#### Working With Secrets in the Tapis Security Kernel (SK) ####
17+
We are now storing LDAP secrets within the Tapis Security Kernel (SK). This is the official Tapis service for
18+
storing secrets and authorization data. For more background information on the Tapis SK, see
19+
the [documentation](https://tapis.readthedocs.io/en/latest/technical/security.html).
20+
21+
To retrieve them, use the Python SDK with a token representing the
1822
authenticator. For example:
1923

2024
List all secrets:
@@ -155,7 +159,7 @@ from service.models import TenantConfig, db
155159
import json
156160
c = TenantConfig.query.filter_by(tenant_id='jupyter-tacc-dev')[0]
157161
d = {"tacc": {"grant_types": [], "privacy_idea_client_id": "<get_from_stache>", "privacy_idea_client_key": "<get_from_stache>", "privacy_idea_url": "https://pidea02.tacc.utexas.edu", "realm": "tacc"}}
158-
c.mfa_config = json_dumps(d)
162+
c.mfa_config = json.dumps(d)
159163
db.session.commit()
160164
```
161165

configschema.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,16 @@
126126
"default": "Tapis Token Webapp"
127127
},
128128
"turn_off_mfa": {
129-
"type": "boolean",
130-
"description": "A single configuration that will cause Authenticator to disable all MFA checks.",
131-
"default": false
132-
}
129+
"type": "boolean",
130+
"description": "A single configuration that will cause Authenticator to disable all MFA checks.",
131+
"default": false
133132
},
134-
"required": ["dev_ldap_tenant_id"]
133+
"privacy_idea_jwt": {
134+
"type": "string",
135+
"description": "The Tapis service token to authenticate to Privacy Idea."
136+
}
137+
},
138+
"required": [
139+
"dev_ldap_tenant_id"
140+
]
135141
}

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
hashids==1.2.0
22
ldap3
33
requests
4-
flask-wtf
4+
flask-wtf
5+
jwcrypto

service/api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
ProfilesResource, ProfileResource, StaticFilesResource, LoginResource, SetTenantResource, LogoutResource, \
1010
WebappTokenGen, WebappTokenAndRedirect, TenantConfigResource, UserInfoResource, OAuth2ProviderExtCallback, \
1111
OAuthMetadataResource, MFAResource, DeviceFlowResource, DeviceCodeResource, V2TokenResource, \
12-
RevokeTokensResource, SetIdentityProvider, WebappLogout
12+
RevokeTokensResource, SetIdentityProvider, WebappLogout, OIDCjwksResource, OIDCTokensResource#, OIDCUserInfoResource, OIDCMetadataResource
1313
from service.ldap import populate_test_ldap
1414
from service.models import db, app, initialize_tenant_configs
1515

@@ -75,6 +75,11 @@ def authnz_for_authenticator():
7575
api.add_resource(ProfilesResource, '/v3/oauth2/profiles')
7676
api.add_resource(ProfileResource, '/v3/oauth2/profiles/<username>')
7777

78+
# API OIDC resources
79+
#api.add_resource(OIDCMetadataResource, '/v3/oauth2/.well-known/openid-configuration')
80+
api.add_resource(OIDCjwksResource, '/v3/oauth2/jwks')
81+
api.add_resource(OIDCTokensResource, '/v3/oauth2/tokens/oidc')
82+
7883
# Auth server resources
7984
api.add_resource(AuthorizeResource, '/v3/oauth2/authorize')
8085
api.add_resource(LoginResource, '/v3/oauth2/login')

0 commit comments

Comments
 (0)