Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Allow hiding password auth, changing OpenID Connect text and OpenID Connect icon#5101

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

normana10
Copy link
Contributor

@normana10normana10 commentedNov 16, 2022
edited
Loading

Just some ideas to help decrease friction in onboarding developers to my coder deployment

For context, my users willnever use password auth, only Oauth

Examples:

  1. Default coder login (nothing new here, just for reference)
    1
  2. With the following env vars set (also nothing new here, just for reference):
  • CODER_OIDC_ISSUER_URL
  • CODER_OIDC_EMAIL_DOMAIN
  • CODER_OIDC_CLIENT_ID
  • CODER_OIDC_CLIENT_SECRET
    2
  1. With the following env vars set:
  • CODER_OIDC_ISSUER_URL
  • CODER_OIDC_EMAIL_DOMAIN
  • CODER_OIDC_CLIENT_ID
  • CODER_OIDC_CLIENT_SECRET
  • CODER_PASSWORD_AUTH_HIDDEN=true
  • CODER_OIDC_SIGN_IN_TEXT="Sign in with Gitea"
  • CODER_OIDC_ICON_URL=https://gitea.io/images/gitea.png
    3

I only reference Gitea because that's my OpenID Connect provider at home, feel free to replace that with anything you like 👍

I also acknowledge that I'm changing the shape of the return body ofapi/v2/users/authmethods. Not sure if that's a deal breaker?

Also let me know if Coderintentionally didn't want to do any of these. Don't want my random PRs to steamroll any actual conversations that have taken place

matifali reacted with thumbs up emoji
@normana10normana10 requested a review froma team as acode ownerNovember 16, 2022 02:48
@normana10normana10 requested review frompresleyp and removed request fora teamNovember 16, 2022 02:48
Copy link
Member

@kylecarbskylecarbs left a comment

Choose a reason for hiding this comment

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

Hey 👋 I appreciate the contribution!

I think we'll want to end up disabling password authentication instead of hiding it for security reasons. I'll review this later today!

@bpmct
Copy link
Member

@kylecarbs and I just had a chat and decided we shouldn't completely disable the password login so the defaultOwner account can log in.

However, we can put it behind a backdoor (e.g.?auth=password) so that users don't see an option to log in with a user/pass. Also, OIDC users wouldn't be able to log in with a password anyways

@normana10
Copy link
ContributorAuthor

Implemented

With the following env vars set:

  • CODER_OIDC_ISSUER_URL
  • CODER_OIDC_EMAIL_DOMAIN
  • CODER_OIDC_CLIENT_ID
  • CODER_OIDC_CLIENT_SECRET
  • CODER_PASSWORD_AUTH_HIDDEN=true
  • CODER_OIDC_SIGN_IN_TEXT="Sign in with Gitea"
  • CODER_OIDC_ICON_URL=https://gitea.io/images/gitea.png

image
image

dcarrion87, bpmct, and matifali reacted with thumbs up emojintimo, Kira-Pilot, and MrPeacockNLB reacted with heart emoji

@presleyppresleyp removed their request for reviewNovember 28, 2022 15:39
@github-actions
Copy link

This Pull Request is becoming stale. In order to minimize WIP, prevent merge conflicts and keep the tracker readable, I'm going close to this PR in 3 days if there isn't more activity.

@github-actionsgithub-actionsbot added the staleThis issue is like stale bread. labelDec 6, 2022
# Conflicts:#cli/deployment/config.go#cli/server.go#cli/testdata/coder_server_--help.golden#coderd/userauth.go#codersdk/deploymentconfig.go#docs/admin/auth.md#site/src/api/typesGenerated.ts#site/src/components/SignInForm/SignInForm.tsx
@github-actionsgithub-actionsbot removed the staleThis issue is like stale bread. labelDec 7, 2022
@github-actions
Copy link

This Pull Request is becoming stale. In order to minimize WIP, prevent merge conflicts and keep the tracker readable, I'm going close to this PR in 3 days if there isn't more activity.

@github-actionsgithub-actionsbot added the staleThis issue is like stale bread. labelDec 14, 2022
@mafredri
Copy link
Member

I think we'll want to end up disabling password authentication instead of hiding it for security reasons. I'll review this later today!

@kylecarbs how would an owner/admin sign in if we disable password auth? As@bpmct proposed, we could put it behind?password=password, or maybe better/login/admin. But ultimately that seems like an inconvenience. Maybe it's negligible though.

Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Backend changes look good to me with one minor request if we keep the flag.

@kylecarbs
Copy link
Member

I think I'd prefer if we did a small "Login with Password" link at the bottom that would permit authenticating with a password. It's awkward to not allow it, since in emergency situations it would be required.

An alternative is to take the stance that owners/admins should be able to modify the deployment, so they could always disable this feature.

@bpmct
Copy link
Member

I think I'd prefer if we did a small "Login with Password" link at the bottom that would permit authenticating with a password. It's awkward to not allow it, since in emergency situations it would be required.

An alternative is to take the stance that owners/admins should be able to modify the deployment, so they could always disable this feature.

I can get behind a small link as long as it's clear that SSO is preferred. Many login forms tend to have both even if 99% of an organization's users use SSO

kylecarbs reacted with thumbs up emoji

Copy link
Member

@bpmctbpmct left a comment

Choose a reason for hiding this comment

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

This UX LGTM! Thanks for the contribution, let's ship it 🚢

<div>
<LoadingButton
loading={isLoading}
{showPasswordAuth && (
Copy link
Member

Choose a reason for hiding this comment

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

We have some new conditionals in this file introduced by the new booleans:nonPasswordAuthEnabled andshowPasswordAuth. Considering the file is getting fairly large, it might be nice to break the JSX inside these conditionals into separate components in separate files. This will make everything a bit more readable. Not a blocker though!

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I agree

I took a hack at it (might have made a few stylistic choices, open to feedback)

Also turned thesevar && into<Maybes as I saw that used all over the codebase (and might have to steal that for myself)

Copy link
Member

Choose a reason for hiding this comment

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

Looks beautiful! Thanks for leaving things better than you found them :)

@github-actions
Copy link

github-actionsbot commentedJan 20, 2023
edited
Loading

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@normana10normana10force-pushed theconfigurable-openid-connect-text branch from6e20df2 to1ed7911CompareJanuary 20, 2023 04:33
@normana10
Copy link
ContributorAuthor

normana10 commentedJan 20, 2023
edited
Loading

Oops sorry pushed the golden files update from a different computer

@kylecarbs
Copy link
Member

@normana10 seems likemake gen isn't quite producing the same for you... want me to post a patch you can apply?

@normana10
Copy link
ContributorAuthor

@kylecarbs

Feel free

I keep trying to runmake gen and it does nothing

Then I do amake gen -B

And I get a:

$ make gen -Bpanic: could not start resource: : dial unix /var/run/docker.sock: connect: connection refusedgoroutine 1 [running]:main.main()/Users/normana10/git/coder/coderd/database/gen/dump/main.go:23 +0xb25exit status 2make: *** [Makefile:461: coderd/database/dump.sql] Error 1

(On my Mac)

Which.... totally makes sense, I don't have Docker installed on my Mac

Buuuut, when I try the same on my Fedora computer it ends up erroring out with a:

...../docs/api/workspaces.md 99ms../docs/manifest.json 16ms../coderd/apidoc/swagger.json 351msDone in 4.37s.ERROR: The 'yq' dependency is required, but is not available.ERROR: One or more dependencies are not available, check above log output for more details.make: *** [Makefile:509: site/.prettierrc.yaml] Error 1

But...yq is definitely installed

@mafredri
Copy link
Member

@normana10 sorry the error is so unhelpful, you'll need to haveyq v4 installed, either asyq4 oryq --version >= v4.

@normana10
Copy link
ContributorAuthor

$ yq --versionyq version 4.2.0

🤷

@normana10
Copy link
ContributorAuthor

Wait I just noticed thatyqoutside of nix-shell is v4 butinside it's v3 o.O

Just symlinked my install ofyq toyq4 andmake gen -B ran just fine

Pushing up now

@normana10
Copy link
ContributorAuthor

That was a roller coaster but I think it's all good now? 👍

Thanks!

@kylecarbs
Copy link
Member

Woot woot. Thanks for pushing through@normana10 🥳

@kylecarbs
Copy link
Member

@normana10 can you merge inmain then I'll merge this in ASAP! Thank you again for being patient, this was a controversial one for us.

@normana10
Copy link
ContributorAuthor

@kylecarbs

Done

Sorry if I caused any issues 😬

@normana10normana10 changed the titleAllow hiding password auth, changing OpenID Connect text and OpenID Connect iconfeat: Allow hiding password auth, changing OpenID Connect text and OpenID Connect iconJan 30, 2023
@kylecarbskylecarbsenabled auto-merge (squash)January 31, 2023 18:26
@kylecarbskylecarbs merged commit69fce04 intocoder:mainJan 31, 2023
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 31, 2023
@kylecarbs
Copy link
Member

@normana10 we're now using this onhttps://dev.coder.com 😎

image

@github-actionsgithub-actionsbot deleted the configurable-openid-connect-text branchMay 17, 2024 00:30
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri left review comments

@Kira-PilotKira-PilotKira-Pilot approved these changes

@kylecarbskylecarbskylecarbs approved these changes

@bpmctbpmctbpmct approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@normana10@bpmct@mafredri@kylecarbs@Kira-Pilot

[8]ページ先頭

©2009-2025 Movatter.jp