-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
*: add --enable-automatic-registration flag to worker #463
Conversation
39ab5cc
to
375da03
Compare
I think we probably want to carefully think about how we expose this type of knob. In general, this seems like a per-connector configuration, and maybe it's not even something you can configure per-connector, but each connector should probably say whether or not they require registration. Thus:
|
remoteIdentity := user.RemoteIdentity{ConnectorID: ses.ConnectorID, ID: ses.Identity.ID} | ||
|
||
// Get the connector used to log the user in. | ||
var conn connector.Connector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking this out into its own method, eg .(s *Server) GetConnectorByID(id string)
will make this long method a bit easier to read.
LGTM after the remaining comments are addressed |
ea472ed
to
09a6857
Compare
@sym3tri renamed to "enable-automatic-registration" to match "enable-registration" to show similarity and made them exclusive. |
Thanks. LGTM ship it |
@@ -90,6 +92,11 @@ func main() { | |||
os.Exit(0) | |||
} | |||
|
|||
if (*enableRegistration) && (*registerOnFirstLogin) { | |||
fmt.Fprintln(os.Stderr, "The flags --enable-registration and --register-on-first-login cannot both be true.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here register-on-first-login
is the old name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
scratch that LGTM. found a typo |
For remote connectors, allow users to skip registration.
09a6857
to
35cab93
Compare
When specified the "--register-on-first-login" allows users logging in through remote connectors to skip registration. This make a lot of sense for connectors like LDAP, which have their own registration upstream.
Closes #310
This change also renames "server/testutil.go" to "server/testutil_test.go" to ensure it's not used outside of tests.
cc @sym3tri