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

Support for short-lived access tokens #393

Open
smithrobs opened this issue Aug 22, 2024 · 1 comment
Open

Support for short-lived access tokens #393

smithrobs opened this issue Aug 22, 2024 · 1 comment
Labels
kind/enhancement Improvements or new features

Comments

@smithrobs
Copy link
Contributor

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

It would be nice to have support for short-lived access tokens.

Example:

import * as service from "@pulumi/pulumiservice";

const accessToken = new service.AccessToken("token", {
    description: "example-accesstoken",
    expires: 1724375054 // (GMT): Friday, August 23, 2024 1:04:14 AM
});
@smithrobs smithrobs added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Aug 22, 2024
@cleverguy25 cleverguy25 removed the needs-triage Needs attention from the triage team label Aug 23, 2024
@yenoromm
Copy link

yenoromm commented Dec 3, 2024

Just to add fuel to the fire, is a fixed point in time like suggested above the most maintainable approach for users? It seems pretty static, how do we as users handle the rotation of this? Through some bespoke imperative function?

My suggestion would be keep it more aligned with something like the tls provider and certificates. Specify an expiry time period (hours/days/months etc) and have an early renewal period so we don't wait for it to expire before renewing. Unknown to me is how Pulumi cloud handle revoking tokens whilst in use, it may cause an error if the token is in active use at the time of replacement but waiting for it to expire seems equally as breaking. I think something like this would be easier to consume as a user:

import pulumi_pulumiservice as pulumiservice

pulumiservice.AccessToken(
    "token",
    description = "example-accesstoken",
    active_hours = 720,
    early_replacement_hours = 48
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

3 participants