Skip to content

Commit

Permalink
updated api-clients so that their provenance records have a org_acces…
Browse files Browse the repository at this point in the history
…s_level attribute in Dynamo. Also added a step to add their RORs to SSM
  • Loading branch information
briri committed Jul 17, 2024
1 parent 18bb19c commit fe8c1a0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
7 changes: 4 additions & 3 deletions config/prd/regional/api-clients/stanford.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ parameters:
IdTokenValidity: '7'
RefreshTokenValidity: '10080'

# hooks:
# after_create:
# cmd: 'src/scripts/add-api-client.sh prd stanford http://localhost:3000/callback'
hooks:
after_update:
cmd: 'src/scripts/add-api-client.sh prd stanford http://localhost:3000/callback'
cmd: 'aws ssm put-parameter --overwrite --name /uc3/dmp/tool/provenance/stanford/ror_list --type String --value \'["https://ror.org/03mtd9a03","https://ror.org/00f54p054","https://ror.org/014qe3j22","https://ror.org/0551gkb08"]\''
5 changes: 5 additions & 0 deletions config/prd/regional/api-clients/uc-boulder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ parameters:
AuthSessionValidatyMinutes: '3'
IdTokenValidity: '7'
RefreshTokenValidity: '10080'

hooks:
after_update:
cmd: 'src/scripts/add-api-client.sh prd uc-boulder http://localhost:3000/callback'
cmd: 'aws ssm put-parameter --overwrite --name /uc3/dmp/tool/provenance/uc-boulder/ror_list --type String --value \'["https://ror.org/02ttsq026"]\''
5 changes: 5 additions & 0 deletions config/prd/regional/api-clients/uc-riverside.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ parameters:
AuthSessionValidatyMinutes: '3'
IdTokenValidity: '7'
RefreshTokenValidity: '10080'

hooks:
after_update:
cmd: 'src/scripts/add-api-client.sh prd uc-riverside http://localhost:3000/callback'
cmd: 'aws ssm put-parameter --overwrite --name /uc3/dmp/tool/provenance/uc-riverside/ror_list --type String --value \'["https://ror.org/03nawhv43"]\''
2 changes: 1 addition & 1 deletion src/scripts/add-api-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ echo "Creating Provenance item for $2 -> {\"PK\": \"PROVENANCE#$KEY\", \"SK\": \
# Insert the Provenance record for the DMPTool application
aws dynamodb put-item --table-name $DYNAMO_TABLE \
--item \
"{\"PK\":{\"S\":\"PROVENANCE#$KEY\"},\"SK\":{\"S\":\"PROFILE\"},\"contact\":{\"M\":{\"email\":{\"S\":\"$ADMIN_EMAIL\"},\"name\":{\"S\":\"Administrator\"}}},\"description\":{\"S\":\"The $2 $1 system\"},\"downloadUri\":{\"S\":\"https://$3/api/v2/plans/\"},\"homepage\":{\"S\":\"https://$3\"},\"name\":{\"S\":\"$2\"},\"redirectUri\":{\"S\":\"https://$3/callback\"},\"tokenUri\":{\"S\":\"https://$3/oauth/token\"}}"
"{\"PK\":{\"S\":\"PROVENANCE#$KEY\"},\"SK\":{\"S\":\"PROFILE\"},\"contact\":{\"M\":{\"email\":{\"S\":\"$ADMIN_EMAIL\"},\"name\":{\"S\":\"Administrator\"}}},\"description\":{\"S\":\"The $2 $1 system\"},\"downloadUri\":{\"S\":\"https://$3/api/v2/plans/\"},\"homepage\":{\"S\":\"https://$3\"},\"name\":{\"S\":\"$2\"},\"redirectUri\":{\"S\":\"https://$3/callback\"},\"tokenUri\":{\"S\":\"https://$3/oauth/token\"},\"org_access_level\":{\"S\":\"restricted\"}}"

0 comments on commit fe8c1a0

Please sign in to comment.