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: TOTP dynamic secret provider #2742

Merged
merged 14 commits into from
Nov 21, 2024
Merged

Conversation

sheensantoscapadngan
Copy link
Member

@sheensantoscapadngan sheensantoscapadngan commented Nov 15, 2024

Description 📣

This adds support for new dynamic secret provider - TOTP + documentation

Tested with Bitbucket and our very own TOTP

image

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

@sheensantoscapadngan sheensantoscapadngan changed the title WIP feat: TOTP dynamic secret provider feat: TOTP dynamic secret provider Nov 18, 2024
@sheensantoscapadngan sheensantoscapadngan marked this pull request as ready for review November 18, 2024 11:35
Copy link
Contributor

@scott-ray-wilson scott-ray-wilson left a comment

Choose a reason for hiding this comment

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

Only one minor comment on the current code but a couple of thoughts:

  1. as a user, if I leased a TOTP dynamic secret I would expect the code to be valid for the duration of the lease; I think it's confusing I can have a valid lease but invalid code - maybe we could disable max/default TTL for TOTP and disable renew/revoke, and configure based of the providers delta and use the authenticator.timeRemaining to display expiry?

  2. I had to use a QR code scanner to get the URL - I'm not sure the requested use case for this feature but I think most users would expect to be able to enter the key displayed on 2fa setup pages such as bitbucket or google as an alternative?

Copy link
Contributor

@scott-ray-wilson scott-ray-wilson left a comment

Choose a reason for hiding this comment

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

  1. I think we should either hide or disable these buttons with a tooltip for TOTP and also probably not showing the expiry since it's provider determined - I know it's a small window but we know this value is incorrect so I think it would be better not to display it?

CleanShot 2024-11-20 at 09 10 19@2x

  1. I think we should have helper text on the create/update form for TOTP explaining that these default values should work with most providers and should only be configured if the provider explicitly provides different values

CleanShot 2024-11-20 at 09 19 18@2x

  1. Prereq should include option for key in addition to url

CleanShot 2024-11-20 at 09 28 35@2x

Copy link
Contributor

@scott-ray-wilson scott-ray-wilson left a comment

Choose a reason for hiding this comment

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

LGTM! Great work Sheen!

@sheensantoscapadngan sheensantoscapadngan merged commit 1866ed8 into main Nov 21, 2024
5 checks passed
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