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

token added #73

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .env_file
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
JWT_SECRET='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoidGVzbGltIiwicGFzc3dvcmQiOjE1MTYyMzkwMjJ9.QM1IQgwJ3RmeLRBhQGER1zaiWTFhO4FrDy-Oq9uMgyo'
LOG_LEVEL=DEBUG
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.DS_Store
.env*
.flaskenv
*.pyc
*.pyo
Expand All @@ -16,7 +15,6 @@ _mailinglist
.idea/
docs/_build/
__pycache__
.env_file

# Coverage reports
htmlcov/
Expand Down
8 changes: 6 additions & 2 deletions aws-auth-patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ data:
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::519002666132:role/eksctl-simple-jwt-api-nodegroup-n-NodeInstanceRole-1DBHED9TMYRZZ
rolearn: arn:aws:iam::416274195800:role/eksctl-simple-jwt-api-nodegroup-n-NodeInstanceRole-1DBHED9TMYRZZ
username: system:node:{{EC2PrivateDNSName}}
- system:masters
rolearn: arn:aws:iam::519002666132:role/UdacityFlaskDeployCBKubectlRole
rolearn: arn:aws:iam::416274195800:role/UdacityFlaskDeployCBKubectlRole
username: build
- groups:
- system:masters
rolearn: arn:aws:iam::416274195800:role/UdacityFlaskDeployCBKubectlRole
username: build
kind: ConfigMap
metadata:
creationTimestamp: "2022-05-11T11:16:26Z"
Expand Down
2 changes: 2 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ phases:
- $(aws ecr get-login --no-include-email)
- export KUBECONFIG=$HOME/.kube/config
- echo `ls -l`
- pip3 install -r requirements.txt
- python -m pytest test_main.py
build:
commands:
- docker build --tag $REPOSITORY_URI:$TAG .
Expand Down
2 changes: 1 addition & 1 deletion ci-cd-codepipeline.cfn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Parameters:

GitHubUser:
Type: String
Default: SudKul
Default: teslimSulaiman
Description: GitHub username or organization
MinLength: 3
MaxLength: 100
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from flask import Flask, jsonify, request, abort


JWT_SECRET = os.environ.get('JWT_SECRET', 'abc123abc1234')
JWT_SECRET = os.environ.get('JWT_SECRET', 'eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiQWRtaW4iLCJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6InRlc2xpbSIsImV4cCI6MTcxNzc1NjQwMCwiaWF0IjoxNjg2MTM0MDAwfQ.nCXz1TvNZbJ2zmrBVb1AIlgaWow_ejyt4_5EF3fLEO8')
LOG_LEVEL = os.environ.get('LOG_LEVEL', 'INFO')


Expand Down
2 changes: 1 addition & 1 deletion trust.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::519002666132:root"
"AWS": "arn:aws:iam::416274195800:root"
},
"Action": "sts:AssumeRole"
}
Expand Down