Skip to content
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

feat: SSO MFA - Add SSOMFASessionData #47647

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Joerger
Copy link
Contributor

@Joerger Joerger commented Oct 16, 2024

Part of the implementation of SSO MFA

Adds the storage of SSOMFASessionData. This will be used in follow up PRs to complete the SSO MFA flow.

@Joerger Joerger added the no-changelog Indicates that a PR does not require a changelog entry label Oct 16, 2024
Copy link
Contributor

@espadolini espadolini left a comment

Choose a reason for hiding this comment

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

The names "Create" and "Update" invoke a specific meaning in the Teleport API, but the methods on auth.Server are both very much upserts.

return trace.BadParameter("missing parameter Username")
}

value, err := json.Marshal(sd)
Copy link
Contributor

@espadolini espadolini Oct 17, 2024

Choose a reason for hiding this comment

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

If this is a brand new type I'd strongly recommend protojson, FWIW.

edit: nevermind, it's specifically defined as JSON

Copy link
Contributor

Choose a reason for hiding this comment

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

The struct contains a protobuf-defined type; is that currently (wrongly) marshaled and unmarshaled with encoding/json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suppose so, what issues does this cause? We are already json marshalling *mfav1.ChallengeExtensions in the webauthn session data as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you think a custom marshaller on services.SSOMFASessionData to protojson.Marshal the challenge extensions is warranted?

@Joerger Joerger mentioned this pull request Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants