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

fix(locker): fix the environment variables/migrations for locker #200

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NishantJoshi00
Copy link
Member

This pull request includes several changes across multiple files to enhance the functionality and security of the locker system. The most important changes include updates to environment variables, SQL schema modifications, and adding tenant headers to API requests.

Environment variable updates:

SQL schema modifications:

  • lib/aws/migrations/locker-schema.sql: Added new tables (fingerprint, vault, entity) and modified existing tables (locker, merchant) to include additional columns and constraints.

Adding tenant headers to API requests:

  • locker.sh: Added x-tenant-id: public header to API requests for key management.
  • unlock_locker.sh: Added x-tenant-id: public header to API requests for key management.

@@ -32,15 +32,15 @@ cat << EOF > locker-inner.sh
echo "Please enter the keys that are created during the locker master key generation"
echo "Enter the key1"
read -s KEY1
curl -X 'POST' 'localhost:8080/custodian/key1' -H 'Content-Type: application/json' -d '{ "key": "'\\\\\\\$KEY1'" }'
curl -X 'POST' 'localhost:8080/custodian/key1' -H "x-tenant-id: public" -H 'Content-Type: application/json' -d '{ "key": "'\\\\\\\$KEY1'" }'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x-tenant-id will always be 'public'? or can this vary with user deployments?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently, depends on the environment variables. as we have set it to public.

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

Successfully merging this pull request may close these issues.

2 participants