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

test.sh is making incorrect assumptions #3

Open
franck-boullier opened this issue Jan 30, 2020 · 1 comment
Open

test.sh is making incorrect assumptions #3

franck-boullier opened this issue Jan 30, 2020 · 1 comment

Comments

@franck-boullier
Copy link
Member

The problems:

Incorrect AWS profile:

In the file test.sh
The code reads:

-H "Authorization: Bearer $(aws --profile uneet-dev ssm get-parameters --names API_ACCESS_TOKEN --with-decryption --query Parameters[0].Value --output text)" \

This IS WRONG: we should NOT use uneet-dev here but the correct value based on

  • Installation ID (AWS parameter INSTALLATION_ID)
  • Stage (AWS parameter STAGE)

The correct value for uneet-dev for a given environment is also declared in Travis Setting.
It is then passed on as the variable TRAVIS_PROFILE.

Problematic assumptions:

"userId": "32",

assumes that there is a user with userId = 32 in the installation <-- This might NOT be true.

"userApiKey": "kwmJ6OT6tzEdmctCrT3uEt7kMnLEqlzckW4eaTvX"

assumes that userApiKey for user 32 has a certain value in the installation <-- This might NOT be true.

@kaihendry
Copy link
Contributor

RE ${INSTALLATION_ID}-${STAGE}, you have a chicken and egg problem as described upon #4 (comment)

I agree userId and userApiKey is bad, but since these couldn't be created programatically (I asked you several times about this), I have no choice but to hard code it. Yes it could go into a parameter store, but that doesn't really help. It only adds a level of indirection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants