Skip to content

PULP-2347: forward encoded VPN secret from Vault - #1474

Merged
decko merged 1 commit into
pulp:mainfrom
decko:pulp-2347-vpn-wire-secret
Sep 15, 2026
Merged

decko merged 1 commit into
pulp:mainfrom
decko:pulp-2347-vpn-wire-secret

Conversation

@decko

@decko decko commented Sep 14, 2026

Copy link
Copy Markdown
Member

Summary

Treat the Vault VPN secret as the base64-encoded wire value and forward it unchanged from nginx to Akamai.

Changes

  • Remove nginx runtime base64 encoding.
  • Substitute the Vault-provided value directly into X-Pulp-VPN-Access.
  • Update the PULP-2347 changelog entry.

Validation

  • git diff --check passed.
  • No Python files changed; no test suite was required.
  • Stage Vault must be updated to the newline-free base64-encoded value before deployment.
  • Production promotion requires the same Vault value contract.

Jira

PULP-2347


Labels: ai-assisted
Assisted-by: Claude

Summary by Sourcery

Forward the Vault-provided encoded VPN secret directly through nginx to Akamai.

Bug Fixes:

  • Forward the Vault-provided VPN secret unchanged as the encoded value expected by Akamai.

Deployment:

  • Update the Vault VPN secret contract to provide a newline-free base64-encoded value before deployment.

Chores:

  • Update the PULP-2347 changelog entry.

@sourcery-ai

sourcery-ai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The nginx VPN proxy now treats the Vault secret as the complete base64-encoded wire value and forwards it unchanged to Akamai, eliminating runtime encoding; the changelog records the change, and deployments must supply the updated newline-free Vault value.

Sequence diagram for forwarding the Vault-encoded VPN secret

sequenceDiagram
    participant Vault
    participant NginxInit as NginxInit
    participant Nginx
    participant Akamai

    Vault->>NginxInit: VPN_ACCESS_SECRET
    NginxInit->>NginxInit: sed(..., VPN_ACCESS_SECRET, ...)
    NginxInit->>Nginx: exec nginx -c /opt/nginx-rendered/nginx.conf
    Nginx->>Akamai: X-Pulp-VPN-Access: VPN_ACCESS_SECRET
Loading

File-Level Changes

Change Details Files
Forward the Vault-provided VPN secret directly as the encoded header value.
  • Remove shell-side base64 encoding during nginx configuration rendering.
  • Substitute the secret unchanged into the X-Pulp-VPN-Access configuration value.
  • Require Vault to store a newline-free base64-encoded secret before deployment and promotion.
deploy/vpn-proxy.yaml
Document the PULP-2347 behavior change.
  • Update the changelog entry for the new Vault secret contract.
CHANGES/2347.misc

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. This changes the credential material passed into nginx for VPN authentication; if the Vault value is not already in the expected encoding, VPN access could fail or the wrong credential could be accepted. Reverting restores the previous behavior, but an authentication mistake can affect access immediately and requires human verification.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Treat the Vault value as the base64-encoded wire secret and stop re-encoding it in nginx.

Assisted-by: GPT-5.6 Luna
@decko
decko force-pushed the pulp-2347-vpn-wire-secret branch from 449f182 to 0fa5ca6 Compare September 14, 2026 15:37

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sourcery assessment

Approved.

@decko

decko commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

/retest

@decko
decko merged commit 69b320e into pulp:main Sep 15, 2026
3 of 4 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.

1 participant