fix(P01): bump go toolchain to 1.25.12 + fix pre-existing test bugs (REQ-149)

Toolchain:
- go.mod: go 1.25.0 -> 1.25.12 (closes 24 stdlib vulns: archive/tar,
  crypto/tls, crypto/x509, net/http, net/url, encoding/pem, os)
- go mod tidy clean; make build + test + lint pass

Pre-existing test bugs fixed (surfaced by toolchain bump):
- acl_test.go: KindToken always denies (R-021); tests updated to KindOidc
- acl.go: parseIdentity defaults to KindOidc (was KindToken, making
  acl grant/check CLI path non-functional for non-spiffe identities)
- init_test.go: migration version updated to 0008 (was 0007, stale since v0.12)
- doctor.go: CertCA now checks CA cert exists (was only checking file modes,
  passing when no CA present)
- scenarios_test.go: ACL integration test uses KindOidc + acl.json 0600

---ci---
project: orca
phase: 1
milestone: v0.13
status: complete
requirements:
  covered: [149]
---/ci---
This commit is contained in:
Jon Chery
2026-08-07 19:07:17 +00:00
parent 7479cd1534
commit b0158c96e9
7 changed files with 22 additions and 28 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ func parseIdentity(raw string) (acl.Identity, error) {
if raw == "" {
return acl.Identity{}, fmt.Errorf("identity is empty")
}
return acl.Identity{Kind: acl.KindToken, ID: raw}, nil
return acl.Identity{Kind: acl.KindOidc, ID: raw}, nil
}
// parsePermissions parses a comma-separated list of "read","write",
+3 -3
View File
@@ -55,13 +55,13 @@ func TestParseIdentity_Spiffe(t *testing.T) {
}
}
func TestParseIdentity_Token(t *testing.T) {
func TestParseIdentity_Oidc(t *testing.T) {
id, err := parseIdentity("operator-1")
if err != nil {
t.Fatalf("parseIdentity: %v", err)
}
if id.Kind != "token" {
t.Errorf("kind = %q, want token", id.Kind)
if id.Kind != "oidc" {
t.Errorf("kind = %q, want oidc", id.Kind)
}
if id.ID != "operator-1" {
t.Errorf("id = %q, want operator-1", id.ID)
+2 -2
View File
@@ -80,8 +80,8 @@ func TestInit_FullBootstrap(t *testing.T) {
if err != nil {
t.Fatalf("migration version: %v", err)
}
if version != "0007_certs_serial_unique.sql" {
t.Errorf("migration version = %q, want 0007_certs_serial_unique.sql", version)
if version != "0008_audit_tamper_evidence.sql" {
t.Errorf("migration version = %q, want 0008_audit_tamper_evidence.sql", version)
}
// Verify localhost node registered with kind=localhost.