Skip to content

WIP docs/proposal: submit poll based binding#157

Open
s-urbaniak wants to merge 1 commit into
kbind-dev:mainfrom
s-urbaniak:poll-based-approach
Open

WIP docs/proposal: submit poll based binding#157
s-urbaniak wants to merge 1 commit into
kbind-dev:mainfrom
s-urbaniak:poll-based-approach

Conversation

@s-urbaniak

Copy link
Copy Markdown
Contributor

No description provided.

@s-urbaniak s-urbaniak force-pushed the poll-based-approach branch 3 times, most recently from c6114df to bc0e163 Compare March 28, 2023 10:55
// +kubebuilder:validation:MinLength=1
ClusterID string `json:"clusterID"`

// sessionSecret is an ephemeral secret that is valid for this session only.

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.

Is there an advantage to the back-end generating the session secret?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, as it is the only trusted source for the secret. clients could be compromised.

- **MUST** The authentication URL includes a session ID query parameter `s` that was returned from the backend.
- **MUST** The authentication URL includes a base64 encoded SHA256 HMAC signature query parameter `h` that is generated on client side.
The signature signs a payload consisting of all request parameters, the host, scheme, and request body.
- **MUST** The authentication URL includes a random nonce `n` that is generated on client side.

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.

n is missing in the illustrations.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it is not really necessary for understanding the flow, it is a non-cryptographic unique number, could even be a counter.

### Reference implementation

The existing reference implementation needs to be extended to be able to handle the above described polling based approach.
Most notably the existing implementation needs to maintain session state.

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 does the session state contain? Probably

  • session secret
  • nonces used
  • cluster id
  • session id

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

used nonces are not necessary, they are just salting the request.

@s-urbaniak

Copy link
Copy Markdown
Contributor Author

@lhaendler thanks a ton for the review! 🎉 I'll continue enhancing this in the next days 🎉

@s-urbaniak

Copy link
Copy Markdown
Contributor Author

@lhaendler @sttts fyi: I'll rework this and will try to submit a new version of the proposal as I believe the process can indeed reuse OAuth device flow instead reinventing it.

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