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

EVEREST-1023 EVEREST-1025 | [feat] User account management #269

Merged
merged 124 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
cfc9c59
Add Accounts client
mayankshah1607 May 2, 2024
b9f5cd8
add basic unit tests
mayankshah1607 May 3, 2024
04ad1bc
renaming
mayankshah1607 May 3, 2024
fec3548
initialize empty secret & cm
mayankshah1607 May 3, 2024
789d328
add accounts create cmd
mayankshah1607 May 3, 2024
d078756
add list options
mayankshah1607 May 3, 2024
bf5f0dd
refactor
mayankshah1607 May 3, 2024
b898f92
add delete cmd
mayankshah1607 May 3, 2024
a88cdfb
ran format
mayankshah1607 May 3, 2024
f02bc44
add some refactoring for list
mayankshah1607 May 3, 2024
0fb662a
fix linting errors
mayankshah1607 May 3, 2024
0146050
refactor: --kubeconfig is a global flag
mayankshah1607 May 6, 2024
e19128d
create JWT secret
mayankshah1607 May 6, 2024
90a951a
ran make gen
mayankshah1607 May 6, 2024
22625f9
ensure JWT secret during upgrade
mayankshah1607 May 6, 2024
cfc896b
mount JWT secret
mayankshah1607 May 6, 2024
7cab15b
update RBAC
mayankshah1607 May 6, 2024
edf569c
fix rbac
mayankshah1607 May 6, 2024
d60ab30
fix linting
mayankshah1607 May 6, 2024
df0f99b
add session manager
mayankshah1607 May 6, 2024
17193d8
add session spec
mayankshah1607 May 6, 2024
6a5040b
ran automake
mayankshah1607 May 6, 2024
e21981c
add session api
mayankshah1607 May 6, 2024
600a523
rename params
mayankshah1607 May 6, 2024
fa48293
clean-up
mayankshah1607 May 6, 2024
6110733
clean-up and linting
mayankshah1607 May 6, 2024
72e807c
go mod tidy
mayankshah1607 May 6, 2024
bccf83b
add post install step
mayankshah1607 May 6, 2024
aab3c2e
use awk instead of yq
mayankshah1607 May 6, 2024
e478dbd
Update login page to use username/password instead of token
recharte Apr 11, 2024
bf596a9
authenticate admin insecure
mayankshah1607 May 6, 2024
c2fca1d
add everest accounts
mayankshah1607 May 6, 2024
f8f5408
big refactor
mayankshah1607 May 7, 2024
330c23c
go mod tidy
mayankshah1607 May 7, 2024
4752d08
update dev
mayankshah1607 May 7, 2024
d2b8e44
more fixes
mayankshah1607 May 7, 2024
d1c3483
revert
mayankshah1607 May 7, 2024
35c4810
clean-up and set cookie
mayankshah1607 May 7, 2024
3f5f7da
fix CI
mayankshah1607 May 7, 2024
ad435ac
go mod tidy
mayankshah1607 May 7, 2024
8d55107
remove todo line
mayankshah1607 May 7, 2024
255dbe5
change JWT logic
mayankshah1607 May 7, 2024
1478a38
update JWT logic
mayankshah1607 May 8, 2024
f5333a0
fix secret
mayankshah1607 May 8, 2024
60235d7
fix secret
mayankshah1607 May 8, 2024
0f21e43
fix typo
mayankshah1607 May 8, 2024
9d9e08a
fix token logic in upgrade
mayankshah1607 May 8, 2024
3f2d5f3
linters
mayankshah1607 May 8, 2024
8f46757
improve error handling
mayankshah1607 May 8, 2024
fa755bb
allow using manifest from current commit
mayankshah1607 May 8, 2024
b023501
fix dev setup
mayankshah1607 May 8, 2024
669c989
allow using local manifests during install
mayankshah1607 May 8, 2024
3c8d022
typo
mayankshah1607 May 8, 2024
b0afe57
fix tests
mayankshah1607 May 8, 2024
a84efd3
linting
mayankshah1607 May 8, 2024
e568a56
CI testing
mayankshah1607 May 8, 2024
0539a6d
fix CI
mayankshah1607 May 8, 2024
925df47
fix CI
mayankshah1607 May 8, 2024
2377a5f
test CI
mayankshah1607 May 8, 2024
4f1df00
test CI
mayankshah1607 May 8, 2024
308000f
create CI user
mayankshah1607 May 8, 2024
5329340
deployment must be restarted
mayankshah1607 May 8, 2024
cc3f2ef
typo fix
mayankshah1607 May 8, 2024
211dfe1
fix ci
mayankshah1607 May 8, 2024
2a30cf6
use bash shell
mayankshah1607 May 8, 2024
13fef28
undo CI changes
mayankshah1607 May 9, 2024
1bf8879
handle plain-text admin without the use of separate secret
mayankshah1607 May 9, 2024
c3b78db
update dev setup
mayankshah1607 May 9, 2024
2dc0300
clean-up ci
mayankshah1607 May 9, 2024
db973a6
update configs and dev setup
mayankshah1607 May 9, 2024
51708d2
clean-up makefile
mayankshah1607 May 9, 2024
9e36580
refactor
mayankshah1607 May 9, 2024
cc97d71
fix secret
mayankshah1607 May 9, 2024
11cc7ca
fix post install message
mayankshah1607 May 9, 2024
88b9503
print message to stdout
mayankshah1607 May 9, 2024
f7fdf2f
Fix JWT and admin reset logic
mayankshah1607 May 9, 2024
e6ffbd0
fix linting
mayankshah1607 May 9, 2024
88171ce
undo some changes
mayankshah1607 May 14, 2024
62710ad
go mod tidy
mayankshah1607 May 15, 2024
adc010e
typos
mayankshah1607 May 15, 2024
3e00c9e
Update go mod
mayankshah1607 May 15, 2024
5a5dbe3
Use constant time compare when checking password hashed
mayankshah1607 May 15, 2024
a462cc5
Add username/password sanity checks
mayankshah1607 May 15, 2024
406f39a
refactor
mayankshah1607 May 15, 2024
142fd77
change username
mayankshah1607 May 15, 2024
c940fef
fix token
mayankshah1607 May 15, 2024
f2d999b
remove regex for password
mayankshah1607 May 15, 2024
a196621
fix FE tests
mayankshah1607 May 15, 2024
afd04b7
Store everything in a single secret
mayankshah1607 May 16, 2024
ba733f0
fix manifest
mayankshah1607 May 16, 2024
5e84ab2
update install message
mayankshah1607 May 16, 2024
d664eac
revert version.go changes
mayankshah1607 May 16, 2024
68d7de6
clean-up tiltfile
mayankshah1607 May 16, 2024
b817454
Merge branch 'main' into EVEREST-1023
mayankshah1607 May 16, 2024
8b65537
Merge branch 'main' into EVEREST-1023
fabio-silva May 16, 2024
dcd7b4c
Merge branch 'main' into EVEREST-1023
mayankshah1607 May 16, 2024
10763f1
re-arrange steps
mayankshah1607 May 16, 2024
b56b475
chore: add user/pasword to e2e tests
fabio-silva May 16, 2024
54680b5
Merge remote-tracking branch 'origin/EVEREST-1023' into EVEREST-1023
fabio-silva May 16, 2024
ab7297b
Merge branch 'main' into EVEREST-1023
mayankshah1607 May 16, 2024
26e984c
Merge branch 'main' into EVEREST-1023
fabio-silva May 16, 2024
75845ac
Merge branch 'main' into EVEREST-1023
fabio-silva May 16, 2024
751a3e8
Merge branch 'main' into EVEREST-1023
fabio-silva May 16, 2024
ffe447f
Merge branch 'main' into EVEREST-1023
fabio-silva May 16, 2024
8126616
Merge branch 'main' into EVEREST-1023
fabio-silva May 16, 2024
a19e4a2
Merge branch 'main' into EVEREST-1023
fabio-silva May 16, 2024
26f67ee
Merge branch 'main' into EVEREST-1023
fabio-silva May 16, 2024
c27da9b
Merge branch 'main' into EVEREST-1023
fabio-silva May 16, 2024
0a935a3
Merge branch 'main' into EVEREST-1023
fabio-silva May 17, 2024
1e29905
Merge remote-tracking branch 'origin/EVEREST-1023' into EVEREST-1023
fabio-silva May 17, 2024
f7a3827
chore: add missing secrets
fabio-silva May 17, 2024
71616e5
fix: secrets -> inputs
fabio-silva May 17, 2024
93c513d
Merge branch 'main' into EVEREST-1023
fabio-silva May 17, 2024
601982b
Merge branch 'main' into EVEREST-1023
fabio-silva May 17, 2024
8499484
Merge branch 'main' into EVEREST-1023
fabio-silva May 17, 2024
5d36e41
chore: lint/format
fabio-silva May 17, 2024
78c32d2
chore: deploy
fabio-silva May 17, 2024
070dd6f
Merge remote-tracking branch 'origin/EVEREST-1023' into EVEREST-1023
fabio-silva May 17, 2024
7d6960e
Merge branch 'main' into EVEREST-1023
fabio-silva May 17, 2024
37b41d6
feat: add CI_USER/PASSWORD
fabio-silva May 17, 2024
886120c
chore: create user on CI
fabio-silva May 17, 2024
eb91fec
fix: bad password set
fabio-silva May 18, 2024
6b0f1fe
remove authentication from Delete
mayankshah1607 May 21, 2024
355d00c
Merge branch 'main' into EVEREST-1023
fabio-silva May 21, 2024
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
16 changes: 15 additions & 1 deletion .github/actions/fe-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ inputs:
type: string
BACKUP_LOCATION_URL:
type: string
CI_USER:
type: string
CI_PASSWORD:
type: string

runs:
using: "composite"
using: 'composite'
steps:
- uses: pnpm/action-setup@v3
with:
Expand Down Expand Up @@ -118,6 +122,14 @@ runs:
run: |
kubectl port-forward -n everest-system deployment/percona-everest 8080:8080 &

- name: Create Everest test user
shell: bash
env:
CI_USER: '${{ inputs.CI_USER }}'
CI_PASSWORD: '${{ inputs.CI_PASSWORD }}'
run: |
./bin/everestctl accounts create -u ${CI_USER} -p ${CI_PASSWORD}

- name: Run Everest
shell: bash
run: |
Expand All @@ -134,6 +146,8 @@ runs:
- name: Run integration tests
shell: bash
env:
CI_USER: '${{ inputs.CI_USER }}'
CI_PASSWORD: '${{ inputs.CI_PASSWORD }}'
EVEREST_LOCATION_BUCKET_NAME: '${{ inputs.BACKUP_LOCATION_BUCKET_NAME }}'
EVEREST_LOCATION_ACCESS_KEY: '${{ inputs.BACKUP_LOCATION_ACCESS_KEY }}'
EVEREST_LOCATION_SECRET_KEY: '${{ inputs.BACKUP_LOCATION_SECRET_KEY }}'
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/dev-be-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,6 @@ jobs:
--skip-wizard \
--namespaces everest

# API_TOKEN is used later by "make test"
echo "API_TOKEN=$(./bin/everestctl token reset --json | jq .token -r)" >> $GITHUB_ENV


- name: Patch Everest Deployment to use the PR image
run: |
kubectl -n everest-system patch deployment percona-everest --type strategic --patch-file dev/patch-deployment-image.yaml
Expand All @@ -345,6 +341,11 @@ jobs:
run: |
kubectl port-forward --namespace everest-system deployment/percona-everest 8080:8080 &

- name: Create Everest test user
run: |
./bin/everestctl accounts create -u everest_ci -p password
echo "API_TOKEN=$(curl --location -s 'localhost:8080/v1/session' --header 'Content-Type: application/json' --data '{"username": "everest_ci","password": "password"}' | jq -r .token)" >> $GITHUB_ENV

- name: Run integration tests
run: |
cd api-tests
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/dev-fe-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
required: true
BACKUP_LOCATION_URL:
required: true
CI_USER:
required: true
CI_PASSWORD:
required: true

jobs:
e2e:
Expand Down Expand Up @@ -120,6 +124,11 @@ jobs:
run: |
echo "EVEREST_K8_TOKEN=$(./bin/everestctl token reset --json | jq .token -r)" >> $GITHUB_ENV

- name: Create Everest test user
shell: bash
run: |
./bin/everestctl accounts create -u ${{ secrets.CI_USER }} -p ${{ secrets.CI_PASSWORD }}

- name: Expose Everest API Server
shell: bash
run: |
Expand All @@ -146,8 +155,10 @@ jobs:
EVEREST_LOCATION_SECRET_KEY: '${{ secrets.BACKUP_LOCATION_SECRET_KEY }}'
EVEREST_LOCATION_REGION: '${{ secrets.BACKUP_LOCATION_REGION }}'
EVEREST_LOCATION_URL: '${{ secrets.BACKUP_LOCATION_URL }}'
CI_USER: '${{ secrets.CI_USER }}'
CI_PASSWORD: '${{ secrets.CI_PASSWORD }}'
MONITORING_USER: 'admin'
MONITORING_PASSWORD: 'admin'
run: |
cd ui
pnpm --filter "@percona/everest" e2e
pnpm --filter "@percona/everest" e2e
5 changes: 3 additions & 2 deletions .github/workflows/dev-fe-gatekeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
run: |
echo "${{ github.triggering_actor }} does not have permissions on this repo."
exit 1

E2E_tests_workflow:
uses: ./.github/workflows/dev-fe-e2e.yaml
secrets:
Expand All @@ -132,7 +132,8 @@ jobs:
BACKUP_LOCATION_SECRET_KEY: ${{ secrets.BACKUP_LOCATION_SECRET_KEY }}
BACKUP_LOCATION_REGION: ${{ secrets.BACKUP_LOCATION_REGION }}
BACKUP_LOCATION_URL: ${{ secrets.BACKUP_LOCATION_URL }}

CI_USER: ${{ secrets.CI_USER }}
CI_PASSWORD: ${{ secrets.CI_PASSWORD }}

# e2e_execution:
# needs: permission_checks
Expand Down
72 changes: 0 additions & 72 deletions api/auth.go

This file was deleted.

Loading
Loading