Skip to content

mobile sso login flow - #51

Open
brad-defined wants to merge 1 commit into
mainfrom
sso-login-updates
Open

brad-defined wants to merge 1 commit into
mainfrom
sso-login-updates

Conversation

@brad-defined

Copy link
Copy Markdown
Contributor

Support the SSO login flow that breaks the single call into separate authenticate & add host calls (which are feature flagged in the API now.)

@jasikpark jasikpark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The client side looks right to me; nebula-apple#13 builds its SSO login on this commit. My one real ask is in the test mock: as written, the suite would still pass if the Bearer header were missing, sent on Enroll, or if list and create were swapped.

— Caleb + Cache

Comment thread dnapitest/dnapitest.go

// handlerQueued responds with the next queued mock response, regardless of request contents. Used
// for endpoints whose requests carry no fields the mock needs to validate.
func (s *Server) handlerQueued(w http.ResponseWriter, _ *http.Request) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This ignores the request, so nothing checks what makes the v2 calls different from v1: the Authorization: Bearer header, the method (GET list vs POST create share a path), and which host ID the renew path carries. Could the queued entry record the method, path, and Authorization header it expects, and fail on a mismatch? That would also let a test assert that Enroll after CreateEndpointHost sends no token.

Comment thread message/message.go
ID string `json:"id"`
Name string `json:"name"`
NetworkID string `json:"networkID"`
IsBlocked bool `json:"isBlocked"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What should a client do with a blocked host here: skip it when choosing one to renew, or renew it and expect the server to refuse? A line in the doc comment would keep the clients consistent.

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.

2 participants