Skip to content

[Feat]: Fine-grained expiry for JWT Bearer access entries #3755

Description

@matheuscscp

Is your feature request related to a problem? Please describe.

Hi 👋 !

I was looking at the Distribution spec: https://distribution.github.io/distribution/spec/auth/jwt/

    "access": [
        {
            "type": "repository",
            "name": "samalba/my-app",
            "actions": [
                "pull",
                "push"
            ]
        }
    ]

It would be awesome if Zot supported an exp claim per access entry, i.e.:

    "access": [
        {
            "exp": 1415387315,
            "type": "repository",
            "name": "samalba/my-app",
            "actions": [
                "pull",
                "push"
            ]
        }
    ]

My use case is: I want to build enterprise licenses for my org's products on top of OCI JWTs. If Zot supported an exp claim per access entry I would be able to issue licenses containing multiple products at the same time that are mapped to OCI repositories. A customer could have a contract-long product and a free-trial one in the same license.

Describe the solution you'd like

When access is evaluated based on the JWT claims, the access entry is discard if the expiration has passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestrm-externalRoadmap item submitted by non-maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions