fermyon / installer

Fermyon Installer
https://fermyon.dev
Apache License 2.0
159 stars 38 forks source link

feat(*): add auth for hippo/bindle #4

Closed vdice closed 2 years ago

vdice commented 2 years ago

Closes https://github.com/fermyon/nomad-aws-demo/issues/3

Requires https://github.com/fermyon/nomad-aws-demo/pull/1.

Commit with changes apart from #1 in 8c4115280b61460323bc7c710714bbebc1b51bcd

vdice commented 2 years ago

We may want to only add this to Bindle for this PR for 2 reasons:

  1. hippo-cli and spin would need added functionality to add basic auth un/pw values for requests to hippo
  2. @bacongobbler thinks the 'pre-seeded master acccount' work in Hippo should be fairly straightforward and able to be worked on soon.
bacongobbler commented 2 years ago

ACK on 2. I should have the PR up by EOD - just writing some tests at this point

bacongobbler commented 2 years ago

https://github.com/deislabs/hippo/pull/814

vdice commented 2 years ago

Nice, thanks for the link @bacongobbler

I think I can tell from #814 how to set the un/pw values -- but how to set registration mode to AdminOnly?

        # Registration configuration
        Hippo__Administrators__Username = var.admin_account_username
        Hippo__Administrators__Password = var.admin_account_password
bacongobbler commented 2 years ago

Hippo__RegistrationMode = var.administration_mode oughta do it. The accepted values are "Closed", "Open" (default), and "AdministratorOnly".

bacongobbler commented 2 years ago

I think you may have to use the following to set the uname/pwd:

Hippo__Administrators__0__Username = var.admin_account_username
Hippo__Administrators__0__Password = var.admin_account_password

Because it accepts a list of user credentials... Let me see if .NET's documentation says anything about this

bacongobbler commented 2 years ago

Yep: https://stackoverflow.com/a/37657321

vdice commented 2 years ago

(Back into draft while we add auth for Hippo via its own registration mode/config)

vdice commented 2 years ago

We should be able to test this once we have a new Hippo rc we can fetch cc @bacongobbler

vdice commented 2 years ago

Closing this PR which attempted to tackle both bindle and Hippo auth in one go. However, Hippo isn't yet in a state to support bindle auth e2e yet. First PR focusing just on Hippo auth is: https://github.com/fermyon/nomad-aws-demo/pull/8