rebrand: Switchboard Core → Armature

- Rename Go module switchboard-core → armature (155+ files)
- Rename Docker image → gobha/armature
- Rename K8s resources, secrets, deployments
- Rename Prometheus metrics switchboard_* → armature_*
- Rename env vars SWITCHBOARD_ADMIN_* → ARMATURE_ADMIN_*
- Rename DB names switchboard_core* → armature*
- Update all frontend branding, notification templates, docs
- Update CI scripts, e2e tests, Keycloak realm, nginx conf
- Rename scripts/switchboard-ca.sh → scripts/armature-ca.sh
- Rename k8s/switchboard.yaml → k8s/armature.yaml
- Rename chart alerting/dashboard files
- Fix: DockerHub push uses env: binding for secret injection
- Helm chart updated (name, labels, template functions, dashboard, alerting)
- Replace favicon/icon assets with Armature brand

No functional changes. Pure mechanical rename + CI fix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-31 21:39:58 +00:00
parent fb5284f667
commit f0dd43144e
287 changed files with 898 additions and 975 deletions

View File

@@ -5,8 +5,8 @@ import (
"github.com/gin-gonic/gin"
"switchboard-core/models"
"switchboard-core/store"
"armature/models"
"armature/store"
)
type Mode string

View File

@@ -9,8 +9,8 @@ import (
"github.com/gin-gonic/gin"
"golang.org/x/crypto/bcrypt"
"switchboard-core/models"
"switchboard-core/store"
"armature/models"
"armature/store"
)
const bcryptCost = 12

View File

@@ -109,7 +109,7 @@ func (m *mockIdP) issueToken(sub, email, name string, groups []string, roles []s
claims := jwt.MapClaims{
"iss": m.server.URL,
"sub": sub,
"aud": "switchboard",
"aud": "armature",
"exp": time.Now().Add(1 * time.Hour).Unix(),
"iat": time.Now().Unix(),
"email": email,
@@ -140,7 +140,7 @@ func (m *mockIdP) issueExpiredToken(sub string) string {
claims := jwt.MapClaims{
"iss": m.server.URL,
"sub": sub,
"aud": "switchboard",
"aud": "armature",
"exp": time.Now().Add(-1 * time.Hour).Unix(),
"iat": time.Now().Add(-2 * time.Hour).Unix(),
}
@@ -160,7 +160,7 @@ func (m *mockIdP) issueTokenBadIssuer(sub string) string {
claims := jwt.MapClaims{
"iss": "https://evil.example.com",
"sub": sub,
"aud": "switchboard",
"aud": "armature",
"exp": time.Now().Add(1 * time.Hour).Unix(),
"iat": time.Now().Unix(),
}

View File

@@ -9,8 +9,8 @@ import (
"log"
"strings"
"switchboard-core/models"
"switchboard-core/store"
"armature/models"
"armature/store"
)
// ParseDN parses an RFC 2253 / RFC 4514 distinguished name into key-value pairs.

View File

@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
"switchboard-core/store"
"armature/store"
)
// ErrNoCert is returned when no client certificate is presented on a

View File

@@ -19,7 +19,7 @@ import (
"github.com/gin-gonic/gin"
"switchboard-core/store"
"armature/store"
)
// ── Test CA helpers ──────────────────────────────────────────────────

View File

@@ -5,7 +5,7 @@ import (
"github.com/gin-gonic/gin"
"switchboard-core/store"
"armature/store"
)
// MTLSProxyConfig holds configuration for the proxy-terminated mTLS provider.

View File

@@ -3,7 +3,7 @@ package auth
import (
"testing"
"switchboard-core/store"
"armature/store"
)
func TestParseDN(t *testing.T) {

View File

@@ -18,17 +18,17 @@ import (
"github.com/gin-gonic/gin"
"github.com/golang-jwt/jwt/v5"
"switchboard-core/models"
"switchboard-core/store"
"armature/models"
"armature/store"
)
// OIDCConfig holds OIDC-specific configuration from env vars.
type OIDCConfig struct {
IssuerURL string // e.g. "https://keycloak.corp/realms/switchboard"
IssuerURL string // e.g. "https://keycloak.corp/realms/armature"
ExternalIssuerURL string // browser-facing URL (optional, defaults to IssuerURL)
ClientID string
ClientSecret string
RedirectURL string // e.g. "https://switchboard.corp/api/v1/auth/oidc/callback"
RedirectURL string // e.g. "https://armature.corp/api/v1/auth/oidc/callback"
AutoActivate bool // auto-activate new users (default true)
DefaultTeam string // team ID for auto-provisioned users (optional)
RolesClaim string // JWT claim for role mapping (default "realm_access.roles")
@@ -435,7 +435,7 @@ func (p *OIDCProvider) extractGroups(claims *oidcClaims) []string {
// Keycloak puts groups in different places depending on mapper config.
// Try the configured claim path as a fallback.
// The claims.Groups field handles the simple case. This handles
// nested paths like "resource_access.switchboard.roles".
// nested paths like "resource_access.armature.roles".
// For now, return empty — the direct Groups field covers the
// standard Keycloak group mapper output.
return nil

View File

@@ -3,7 +3,7 @@ package auth_test
import (
"testing"
"switchboard-core/auth"
"armature/auth"
)
func TestOIDCProvider_Discovery(t *testing.T) {
@@ -12,7 +12,7 @@ func TestOIDCProvider_Discovery(t *testing.T) {
p, err := auth.NewOIDCProvider(auth.OIDCConfig{
IssuerURL: idp.IssuerURL(),
ClientID: "switchboard",
ClientID: "armature",
ClientSecret: "secret",
AutoActivate: true,
})
@@ -38,7 +38,7 @@ func TestOIDCProvider_Mode(t *testing.T) {
p, err := auth.NewOIDCProvider(auth.OIDCConfig{
IssuerURL: idp.IssuerURL(),
ClientID: "switchboard",
ClientID: "armature",
})
if err != nil {
t.Fatalf("NewOIDCProvider: %v", err)
@@ -55,7 +55,7 @@ func TestOIDCProvider_NoRegistration(t *testing.T) {
p, err := auth.NewOIDCProvider(auth.OIDCConfig{
IssuerURL: idp.IssuerURL(),
ClientID: "switchboard",
ClientID: "armature",
})
if err != nil {
t.Fatalf("NewOIDCProvider: %v", err)
@@ -68,7 +68,7 @@ func TestOIDCProvider_NoRegistration(t *testing.T) {
func TestOIDCProvider_MissingIssuer(t *testing.T) {
_, err := auth.NewOIDCProvider(auth.OIDCConfig{
ClientID: "switchboard",
ClientID: "armature",
})
if err == nil {
t.Error("expected error for missing issuer URL")
@@ -93,7 +93,7 @@ func TestOIDCProvider_AuthorizationURL(t *testing.T) {
p, err := auth.NewOIDCProvider(auth.OIDCConfig{
IssuerURL: idp.IssuerURL(),
ClientID: "switchboard",
ClientID: "armature",
})
if err != nil {
t.Fatalf("NewOIDCProvider: %v", err)
@@ -105,7 +105,7 @@ func TestOIDCProvider_AuthorizationURL(t *testing.T) {
}
// Should contain the required OIDC parameters
for _, want := range []string{"response_type=code", "client_id=switchboard", "state=test-state", "nonce=test-nonce"} {
for _, want := range []string{"response_type=code", "client_id=armature", "state=test-state", "nonce=test-nonce"} {
if !containsStr(url, want) {
t.Errorf("AuthorizationURL missing %q in %q", want, url)
}
@@ -115,7 +115,7 @@ func TestOIDCProvider_AuthorizationURL(t *testing.T) {
func TestOIDCProvider_UnreachableIssuer(t *testing.T) {
_, err := auth.NewOIDCProvider(auth.OIDCConfig{
IssuerURL: "http://127.0.0.1:1/unreachable",
ClientID: "switchboard",
ClientID: "armature",
})
if err == nil {
t.Error("expected error for unreachable issuer")

View File

@@ -5,8 +5,8 @@ import (
"encoding/json"
"log"
"switchboard-core/database"
"switchboard-core/store"
"armature/database"
"armature/store"
)
// EveryoneGroupID is the stable ID of the implicit "Everyone" group seeded in