Skip to content

Commit

Permalink
Merge branch 'master' into chore/update-deps-test
Browse files Browse the repository at this point in the history
  • Loading branch information
BinamB committed Jan 8, 2021
2 parents 3540622 + 1cdac74 commit 20d7657
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# To run: docker run --rm -d -v /path/to/fence-config.yaml:/var/www/fence/fence-config.yaml --name=fence -p 80:80 fence
# To check running container: docker exec -it fence /bin/bash

FROM quay.io/cdis/python-nginx:pybase3-1.4.1
FROM quay.io/cdis/python-nginx:pybase3-1.4.2

ENV appname=fence

Expand Down
2 changes: 2 additions & 0 deletions fence/resources/user/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def get_user_info(current_session, username):
info = {
"user_id": user.id, # TODO deprecated, use 'sub'
"sub": user.id,
# getattr b/c the identity_provider sqlalchemy relationship could not exists (be None)
"idp": getattr(user.identity_provider, "name", ""),
"username": user.username, # TODO deprecated, use 'name'
"name": user.username,
"display_name": user.display_name, # TODO deprecated, use 'preferred_username'
Expand Down
17 changes: 17 additions & 0 deletions openapis/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2026,6 +2026,7 @@ components:
type: object
required:
- user_id
- idp
- sub
- username
- name
Expand All @@ -2044,6 +2045,22 @@ components:
user_id:
type: number
description: 'This value is deprecated in favor of sub.'
idp:
type: string
description: |
The Identity Provider used to autheticate the user. Given instances of Fence
may or may not have all of these available (the set of IDPs available is a configuration).
* *google* - Google/GSuite
* *ras* - NIH's Researcher Auth Service (RAS)
* *itrust* - NIH Login / iTrust / eRA Commons
* *fence* - Upstream Fence (the idp used depends on the specific configuration, consult the Gen3 Operators)
* *orcid* - ORCHID
* *microsoft* - Microsoft
* *elixir* - Elixir
* *synapse* - Synapse
* *cognito* - AWS Cognito
* More may be added in the future...
sub:
type: string
description: 'Subject Identifier. A locally unique and never reassigned identifier within the Issuer for the end-user.'
Expand Down

0 comments on commit 20d7657

Please sign in to comment.