Skip to content

[v11] set cluster connector name on signin for first cloud user#18445

Merged
JanKaczmarkiewicz merged 3 commits intobranch/v11from
jan/cloud-passwordless-default-preference-backport/v11
Nov 16, 2022
Merged

[v11] set cluster connector name on signin for first cloud user#18445
JanKaczmarkiewicz merged 3 commits intobranch/v11from
jan/cloud-passwordless-default-preference-backport/v11

Conversation

@JanKaczmarkiewicz
Copy link
Copy Markdown
Contributor

@JanKaczmarkiewicz JanKaczmarkiewicz commented Nov 14, 2022

Original PR: #17834

* feat: set cluster connector name on first user signin

* perf: move is passwordless enabled before get users

* fix: move logic to correct handler

* test: test setting default passwordless connector name for cloud (positive case)

* test: add negative test cases

* refactor: flatten nested code

* fix: remove return in case auth preference was not set

* fix: run logic only in cloud

* docs: typo

* fix: run when passwordless

* test: move trySettingConnectorNameToPasswordless as separete method

* docs: add safety comments

* test: rephrase safety comment

* refactor: remove space between call and error check

* fix: remove unnessesery error log from trySettingConnectorNameToPasswordless

* refactor: pass context, rename session context

* docs: add description to trySettingConnectorNameToPasswordless

* test: add descriptive assertion text

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* refactor: simplify error handilng

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* fix: check for non default setting

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* test: correct RPID

* refactor: simplify user creation

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* docs: fix typo

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* test: reorder name filed in the test cases struct

* test: better names for test cases

* refactor: generate token instead of hardcoding arbitrary value

* test: remove user agent header

* fix: check for empty password

* docs: add passwordless check description

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* test: add "first cloud sign-in does not change custom connector"

* test: use correct number of users in "first cloud sign-in does not change custom connector"

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* test: remove is cloud check from test helpers, instead use config

* refactor: store is_passwordless_registration in variable

* test: first cloud sign-in with password does not change connector

* refactor: change isPasswordlessRegistration name

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
@JanKaczmarkiewicz JanKaczmarkiewicz changed the base branch from master to branch/v11 November 14, 2022 17:37
@JanKaczmarkiewicz JanKaczmarkiewicz changed the title [v11] Cloud passwordless default preference for cloud [v11] Cloud passwordless default preference Nov 14, 2022
@JanKaczmarkiewicz JanKaczmarkiewicz marked this pull request as ready for review November 14, 2022 20:07
@JanKaczmarkiewicz JanKaczmarkiewicz changed the title [v11] Cloud passwordless default preference [v11] set cluster connector name on signin for first cloud user Nov 15, 2022
@JanKaczmarkiewicz JanKaczmarkiewicz enabled auto-merge (squash) November 16, 2022 10:40
@JanKaczmarkiewicz JanKaczmarkiewicz merged commit bbfa4ee into branch/v11 Nov 16, 2022
@zmb3 zmb3 deleted the jan/cloud-passwordless-default-preference-backport/v11 branch April 26, 2023 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants