Skip to content

feat: add connections spec for third-party OAuth credentials - #6

Merged
stubbi merged 3 commits into
mainfrom
feat/oauth-connections-spec
Mar 23, 2026
Merged

feat: add connections spec for third-party OAuth credentials#6
stubbi merged 3 commits into
mainfrom
feat/oauth-connections-spec

Conversation

@stubbi

@stubbi stubbi commented Mar 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a first-class connections field to the Instance CRD for configuring OAuth provider credentials
  • Injects PAPERCLIP_OAUTH_CREDENTIALS from a referenced Secret into the Paperclip container
  • Optionally injects PAPERCLIP_OAUTH_PROVIDERS from a ConfigMap for custom provider definitions
  • Companion to paperclipinc/paperclip#15 which added the connections feature to Paperclip

Usage

spec:
  connections:
    credentialsSecretRef:
      name: paperclip-oauth-credentials

With a Secret containing:

apiVersion: v1
kind: Secret
metadata:
  name: paperclip-oauth-credentials
type: Opaque
stringData:
  PAPERCLIP_OAUTH_CREDENTIALS: |
    {
      "github": {"clientId": "...", "clientSecret": "..."},
      "slack": {"clientId": "...", "clientSecret": "..."}
    }

OAuth callback URL must be registered with each provider as:
https://<your-public-url>/api/connections/callback

Test plan

  • 4 new unit tests (credentials injection, custom key, providers catalog, nil connections)
  • All 22 existing tests pass
  • Deploy with connections configured and verify OAuth flow works end-to-end

🤖 Generated with Claude Code

stubbi and others added 2 commits March 23, 2026 16:37
Adds a first-class `connections` field to the Instance CRD that
configures OAuth provider credentials for the Paperclip connections
system (GitHub, GitLab, Slack, etc.).

- ConnectionsSpec with credentialsSecretRef and optional providersConfigRef
- Injects PAPERCLIP_OAUTH_CREDENTIALS from Secret into container env
- Optional PAPERCLIP_OAUTH_PROVIDERS from ConfigMap for custom providers
- 4 new unit tests covering all combinations
- Updated public sample with example OAuth Secret
- Regenerated CRD manifests and Helm chart CRDs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract PAPERCLIP_OAUTH_CREDENTIALS/PROVIDERS to constants (goconst)
- Preallocate volume mounts slice (prealloc)
- Suppress gosec false positive on env var name constant

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@stubbi
stubbi enabled auto-merge (squash) March 23, 2026 15:46
CI runs gosec standalone (not via golangci-lint), which requires
the #nosec G101 comment format instead of //nolint:gosec.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@stubbi
stubbi merged commit 34add3f into main Mar 23, 2026
8 checks passed
@stubbi
stubbi deleted the feat/oauth-connections-spec branch March 23, 2026 16:32
@stubbi stubbi mentioned this pull request Mar 23, 2026
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