Skip to content

Clean up client authentication story #1464

Closed

Description

@ahmedtd

Right now I think most clients are falling into the port-forwarding / token minting path [1]

This is convenient for local development, but I don't think it should be the default authentication mode. We shouldn't assume that a user or service who is interacting with the Substrate API has any particular permissions on the Kubernetes cluster where Substrate is installed.

  1. We should migrate all integration / e2e tests so that the calling code gets a JWT (or client certificate) that will work against the Substrate API from the execution environment. This could be a Kubernetes JWT with the correct audience for connecting to Substrate (via projected volume) if the calling code runs inside a pod. Or if the calling code is running inside of Github actions, there's a Github-issued JWT we can use.

  2. We should document what you should be doing in common scenarios:

a) You are authenticating to the Substrate API from a service running inside a pod in a Kubernetes cluster (same cluster or different cluster). Configure Substrate so that it trusts JWTs issued by that cluster.
b) You are authenticating to the Substrate API as a human running kubectl ate. Set the --endpoint flag to aim at your Substrate install, and tell us how to invoke a command that will return a JWT (like how gcloud is integrated into kubectl) (this isn't built yet)

[1]

func bearerTokenDialOption(ctx context.Context, clientset *kubernetes.Clientset, tokenFile string) (grpc.DialOption, error) {

Activity

  1. added this to the M3 milestone on Sep 4, 2026
  2. destijl commented on Oct 15, 2026

    @destijl
    Collaborator

    My read is:

    1. Internal code migration can come after GA, it's not breaking.
    2. We should really update the docs before GA, so I'm going to leave M3 on this one just for docs.
  3. EItanya commented on Oct 21, 2026

    @EItanya
    Collaborator

    Can we create a new docs issue so it doesn’t seem to be blocking code freeze?

  4. bootsieh commented on Oct 21, 2026

    @bootsieh
    Collaborator

    What is making it block the code freeze, Eitan?

  5. EItanya commented on Oct 21, 2026

    @EItanya
    Collaborator

    I think the complex thing is that we're working with M3 as the GA milestone, and ALSO we want to do a feature freeze ASAP. So the lack of sub-issues make it unclear what's actually left here. The remaining work is just docs, not any code chnges, right?

  6. bootsieh commented on Oct 21, 2026

    @bootsieh
    Collaborator

    The docs are the only part that is M3 blocking, but it's not cut blocking

  7. thompsonmax commented on Oct 22, 2026

    @thompsonmax
    Collaborator

    I have #2851 out to improve the authn UX by supporting credential plugins, but it seems that missed the code slush deadline for M3.

    Sent out #3119 to improve the docs around authn in the meantime.

  8. EItanya commented on Oct 22, 2026

    @EItanya
    Collaborator

    Ok thanks for clarifying, closing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/identityarea/securitySecurity related issue/prkind/designDesign discussion, investigation, or research required before implementation

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions