Skip to content

Ability to add custom headers for Cloudflare Zero Trust #1258

Open

Description

@eamontaf

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

This request is similar to issue 1026. We are interested in being able to generate certificates on clients through a Cloudflare Zero Trust tunnel. According to the cloudflare documentation here, we would need to be able to set the 'cf-access-token' header with a value that is generated with the cloudflared command line utility. This would allow us to perform authentication and authorization prior to reaching our stepca instance.

Why is this needed?

Such a tunnel increases the security of our deployment by providing an additional layer of authentication and authorization. If there were a chance to pass user data into step, it would also potentially provide the ability to template certificates to prevent users from inadvertently or maliciously issuing a certificate with incorrect parameters such an common name or email address.

We are currently building a CA that will issue certificates to Yubikey holders and are using a webhook to map Yubikey serial numbers to users. This could remove the need for the webhook if we could verify that a user had permissions to access the CA via cloudflare rather than needed to provide access over VPN or a physical connection to our network. It also may reduce the administrative burden of maintaining the webhook and the user-to-Yubikey mappings.

Activity

  1. self-assigned this
    on Aug 20, 2024
  2. hslatman commented on Aug 20, 2024

    @hslatman
    Member

    Hi @eamontaf,

    Thank you for opening the issue. We've discussed it in our open source triage meeting. We concluded that we need some more information about how step and step-ca are intended to work in combination with Cloudflare Zero Trust. The main thing we foresee issues with is our use of mTLS to access certain CA endpoints. How can those be supported with CF ZT sitting in front?

    So far this is the only request to support this, and we don't currently have the bandwidth to implement this ourselves, so this'll go on our backlog for now. But we're open to accepting PRs to support this.

  3. added this to the Backlog milestone on Aug 20, 2024
  4. removed
    needs triageWaiting for discussion / prioritization by team
    on Aug 20, 2024
  5. eamontaf commented on Aug 21, 2024

    @eamontaf
    Author

    It appears that Cloudflare ZT provides an option to pass-through untrusted certificates and other options to limit how the connection is handled (docs here), so that may facilitate this . What CA endpoints in particular are the concern?

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions