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

Generate a default admin user #2443

Merged
merged 13 commits into from
Jul 28, 2023
Merged

Generate a default admin user #2443

merged 13 commits into from
Jul 28, 2023

Conversation

hardillb
Copy link
Contributor

@hardillb hardillb commented Jul 10, 2023

part of #2436

Description

This will create a new admin user when the setup wizard runs if none already exist and create_admin: true in the etc/flowforge.yml file

This is to meet a AWS requirement

Related Issue(s)

#2436

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on flowforge/helm to update ConfigMap Template
    • Issue/PR raised on flowforge/CloudProject to update values for Staging/Production

Labels

  • Backport needed? -> add the backport label
  • Includes a DB migration? -> add the area:migration label

part of #2436

This will create a new admin user when the setup wizard runs if
none already exist and `create_admin: true` in the
`etc/flowforge.yml` file

This is to meet a AWS requirement
@hardillb hardillb added this to the 1.10 milestone Jul 10, 2023
@hardillb hardillb requested a review from knolleary July 10, 2023 10:21
@hardillb hardillb self-assigned this Jul 10, 2023
@hardillb
Copy link
Contributor Author

Not sure where to test this at the moment.

@hardillb hardillb marked this pull request as ready for review July 10, 2023 10:45
forge/routes/setup/index.js Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #2443 (e4760e4) into main (0dff4b2) will increase coverage by 72.95%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            main    #2443       +/-   ##
==========================================
+ Coverage   1.58%   74.54%   +72.95%     
==========================================
  Files        495      228      -267     
  Lines      17740     9126     -8614     
  Branches    4141     1879     -2262     
==========================================
+ Hits         282     6803     +6521     
+ Misses     17458     2323    -15135     
Flag Coverage Δ
backend 74.54% <100.00%> (?)
frontend ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
forge/routes/setup/index.js 85.86% <100.00%> (+85.86%) ⬆️

... and 443 files with indirect coverage changes

@hardillb
Copy link
Contributor Author

I've just noticed that admin is banned as a username in the setup wizard, so what should we change this to?

@knolleary
Copy link
Member

Maybe ff-admin ?

forge/routes/setup/index.js Outdated Show resolved Hide resolved
forge/routes/setup/index.js Outdated Show resolved Hide resolved
@hardillb
Copy link
Contributor Author

Updated

@hardillb hardillb requested review from Steve-Mcl and removed request for knolleary July 27, 2023 08:12
Copy link
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

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

looks all good Ben.

Only question I have is should we be adding create_admin: false to default yaml file?

If no - feel free to merge.

etc/flowforge.yml Outdated Show resolved Hide resolved
@hardillb
Copy link
Contributor Author

Will merge when tests finish

@hardillb hardillb merged commit 2cb59e9 into main Jul 28, 2023
4 checks passed
@hardillb hardillb deleted the default-admin-account branch July 28, 2023 08:22
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.

None yet

3 participants