Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker-compose/bluebutton_server_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ else
DJANGO_SLSX_TOKEN_ENDPOINT=${DJANGO_SLSX_TOKEN_ENDPOINT:-"https://test.medicare.gov/sso/session"}
DJANGO_SLSX_SIGNOUT_ENDPOINT=${DJANGO_SLSX_SIGNOUT_ENDPOINT:-"https://test.medicare.gov/sso/signout"}
DJANGO_SLSX_USERINFO_ENDPOINT=${DJANGO_SLSX_USERINFO_ENDPOINT:-"https://test.accounts.cms.gov/v1/users"}
DJANGO_SLSX_RELATIONSHIPS_ENDPOINT=${DJANGO_SLSX_RELATIONSHIPS_ENDPOINT:-"https://test.medicare.gov/account/api/proxy/relationship?my-position=user"}
fi

if [ "${DB_MIGRATIONS}" = true ]
Expand Down
1 change: 1 addition & 0 deletions docker-compose/msls-env-vars.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ DJANGO_SLSX_HEALTH_CHECK_ENDPOINT=http://msls:8080/health
DJANGO_SLSX_TOKEN_ENDPOINT=http://msls:8080/sso/session
DJANGO_SLSX_SIGNOUT_ENDPOINT=http://msls:8080/sso/signout
DJANGO_SLSX_USERINFO_ENDPOINT=http://msls:8080/v1/users
DJANGO_SLSX_RELATIONSHIPS_ENDPOINT=http://msls:8080/account/api/proxy/relationship?my-position=user

DJANGO_SLSX_CLIENT_ID=bb2api
DJANGO_SLSX_CLIENT_SECRET="xxxxx"
Expand Down
1 change: 1 addition & 0 deletions ops/containers/bb-api/files/external/.env.container
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ DJANGO_SLSX_HEALTH_CHECK_ENDPOINT="${DJANGO_SLSX_HEALTH_CHECK_ENDPOINT}"
DJANGO_SLSX_SIGNOUT_ENDPOINT="${DJANGO_SLSX_SIGNOUT_ENDPOINT}"
DJANGO_SLSX_TOKEN_ENDPOINT="${DJANGO_SLSX_TOKEN_ENDPOINT}"
DJANGO_SLSX_USERINFO_ENDPOINT="${DJANGO_SLSX_USERINFO_ENDPOINT}"
DJANGO_SLSX_RELATIONSHIPS_ENDPOINT="${DJANGO_SLSX_RELATIONSHIPS_ENDPOINT}"
DJANGO_SLSX_VERIFY_SSL_EXTERNAL="${DJANGO_SLSX_VERIFY_SSL_EXTERNAL}"
DJANGO_USER_ID_ITERATIONS="${DJANGO_USER_ID_ITERATIONS}"
DJANGO_USER_ID_SALT="${DJANGO_USER_ID_SALT}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ configure_slsx () {
DJANGO_SLSX_TOKEN_ENDPOINT="http://${MSLSX_HOST}:8080/sso/session"
DJANGO_SLSX_SIGNOUT_ENDPOINT="http://${MSLSX_HOST}:8080/sso/signout"
DJANGO_SLSX_USERINFO_ENDPOINT="http://${MSLSX_HOST}:8080/v1/users"
DJANGO_SLSX_RELATIONSHIPS_ENDPOINT="http://${MSLSX_HOST}:8080/account/api/proxy/relationship?my-position=user"

DJANGO_SLSX_CLIENT_ID=bb2api
DJANGO_SLSX_CLIENT_SECRET="xxxxx"
Expand Down
55 changes: 55 additions & 0 deletions ops/containers/mslsx/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def userinfo(usr):
'lastName': user_info['last_name'],
'hicn': user_info['hicn'],
'mbi': user_info['mbi'],
'isCspUser': True,
},
},
}
Expand All @@ -181,5 +182,59 @@ def signout():
return make_response(jsonify({'message': 'signed out.'}), 302)


@app.route('/account/api/proxy/relationship', methods=['GET'])
def retrieve_relationships():
relationships_response = {
'relationships': [
{
'id': '1404f7a1-c33f-480e-9925-23a34b1f7ce5',
'userFirstName': 'John',
'userLastName': 'Smith',
'beneFirstName': 'Jane',
'beneLastName': 'Smith',
'role': 'full',
'roleLevel': 90,
'status': 'active',
'expiresAt': None,
'createdTime': 1794602487,
'updatedTime': 1794602487,
'proxyType': 'caregiver',
'scopes': ['enrollment'],
},
{
'id': '1404f7a1-c33f-480e-9925-23a34b1f7ce5',
'userFirstName': 'John',
'userLastName': 'Smith',
'beneFirstName': 'Test',
'beneLastName': 'Smith',
'role': 'full',
'roleLevel': 90,
'status': 'active',
'expiresAt': 1826138478,
'createdTime': 1794602487,
'updatedTime': 1794602487,
'proxyType': 'caregiver',
'scopes': ['enrollment'],
},
{
'id': '1404f7a1-c33f-480e-9925-23a34b1f7ce5',
'userFirstName': 'John',
'userLastName': 'Smith',
'beneFirstName': 'Test',
'beneLastName': 'Smith',
'role': 'full',
'roleLevel': 10,
'status': 'active',
'expiresAt': None,
'createdTime': 1794602487,
'updatedTime': 1794602487,
'proxyType': 'caregiver',
'scopes': ['enrollment'],
},
]
}
return make_response(jsonify(relationships_response))


if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=8080)
3 changes: 3 additions & 0 deletions ops/containers/selenium/utility-functions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set_slsx () {
export DJANGO_SLSX_TOKEN_ENDPOINT="https://test.medicare.gov/sso/session"
export DJANGO_SLSX_SIGNOUT_ENDPOINT="https://test.medicare.gov/sso/signout"
export DJANGO_SLSX_USERINFO_ENDPOINT="https://test.accounts.cms.gov/v1/users"
export DJANGO_SLSX_RELATIONSHIPS_ENDPOINT="https://test.medicare.gov/account/api/proxy/relationship?my-position=user"
}

set_msls () {
Expand All @@ -22,11 +23,13 @@ set_msls () {
export DJANGO_SLSX_TOKEN_ENDPOINT="http://mslsx:8080/sso/session"
export DJANGO_SLSX_SIGNOUT_ENDPOINT="http://mslsx:8080/sso/signout"
export DJANGO_SLSX_USERINFO_ENDPOINT="http://mslsx:8080/v1/users"
export DJANGO_SLSX_RELATIONSHIPS_ENDPOINT="http://mslsx:8080/account/api/proxy/relationship?my-position=user"
else
export DJANGO_MEDICARE_SLSX_LOGIN_URI="http://localhost:8080/sso/authorize?client_id=bb2api"
export DJANGO_SLSX_HEALTH_CHECK_ENDPOINT="http://localhost:8080/health"
export DJANGO_SLSX_TOKEN_ENDPOINT="http://localhost:8080/sso/session"
export DJANGO_SLSX_SIGNOUT_ENDPOINT="http://localhost:8080/sso/signout"
export DJANGO_SLSX_USERINFO_ENDPOINT="http://localhost:8080/v1/users"
export DJANGO_SLSX_RELATIONSHIPS_ENDPOINT="http://localhost:8080/account/api/proxy/relationship?my-position=user"
fi
}
Loading