Finish the Cairn OBS rename through services, docs, and assets
The rename commit before this one covered module paths and the obvious user-facing strings; this is the rest of it -- the places where "sentry" was a default value, a filename, or a picture rather than a word in a sentence. Defaults that changed: CLICKHOUSE_DATABASE (sentry -> cairnobs), POSTGRES_DATABASE (sentry_metadata -> cairnobs_metadata), and POSTGRES_USERNAME (sentry -> cairnobs), across api/alerting/ingest and the enterprise binaries, plus the compose files and migrate scripts that create those objects. These are *defaults*, so a deployment that sets them explicitly is unaffected -- but any deployment relying on the old defaults must have its environment updated before it picks this up, or it will come up pointing at a database that doesn't exist. Also: the light-mode logo variants (the dark ones existed alone, so the landing page and sidebar rendered a dark mark on a light background), regenerated favicons, and the docs/README/threat-model prose that still said Sentry.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
# imports existed; the repo-root context below is the same shape
|
||||
# enterprise-api's and enterprise-ingest's Dockerfiles already use for
|
||||
# the identical reason.
|
||||
# docker build -f enterprise/Dockerfile -t sentry-enterprise-auth .
|
||||
# docker build -f enterprise/Dockerfile -t cairnobs-enterprise-auth .
|
||||
FROM golang:1.25-alpine AS builder
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
+13
-13
@@ -40,7 +40,7 @@ section for exactly what "not yet run" means here and why. Don't read
|
||||
- `/alerting`'s `queryclient` presents a `RoleService` Bearer token
|
||||
(`API_SERVICE_TOKEN`) when configured -- see
|
||||
`/docs/phase-4-isolation-design.md`'s `alerting`↔`api` gap.
|
||||
- `sentryctl` presents `$SENTRYCTL_TOKEN` as a Bearer credential on every
|
||||
- `cairnobsctl` presents `$CAIRNOBSCTL_TOKEN` as a Bearer credential on every
|
||||
request when set.
|
||||
- `internal/rbacstore`: full CRUD over `users`/`tenants`/
|
||||
`tenant_memberships`/`data_sources` (`metadata/migrations/0017-0032`).
|
||||
@@ -155,7 +155,7 @@ issues a `session.Manager.IssuePendingLogin` token (a distinct Go/JWT
|
||||
type from a real session -- see that type's doc comment for a real bug
|
||||
this design caught in its own tests: a shared JSON key would have let a
|
||||
full session token double as a pending login) as a
|
||||
`sentry_pending_login` cookie (`Path=/auth`) and redirects to
|
||||
`cairnobs_pending_login` cookie (`Path=/auth`) and redirects to
|
||||
`SELECT_TENANT_REDIRECT_URL` (defaults to
|
||||
`{POST_LOGIN_REDIRECT_URL}/select-tenant`) instead of completing the
|
||||
login. From there:
|
||||
@@ -204,7 +204,7 @@ below) and Tantivy (`/search/README.md`'s "Per-tenant indices" section
|
||||
-- needed no code in this module at all, since `search`'s
|
||||
`IndexRegistry` already lived in AGPL core); and deployment-topology
|
||||
routing (does traffic actually reach `enterprise-api` instead of
|
||||
`api`), now a single-flag choice in both `deploy/helm/sentry` and
|
||||
`api`), now a single-flag choice in both `deploy/helm/cairnobs` and
|
||||
`docker-compose.yml` (`enterprise.enabled` / `COMPOSE_PROFILES`), see
|
||||
CLAUDE.md.
|
||||
|
||||
@@ -285,7 +285,7 @@ for both directions is the simpler, still-correctly-scoped choice).
|
||||
A real multi-tenant deployment runs `ingest -mode=server` (agent-facing,
|
||||
tags records, unchanged) alongside `enterprise-ingest` (consumer,
|
||||
per-tenant writes) *instead of* `ingest -mode=consumer` -- see `deploy/
|
||||
helm/sentry`'s `ingest.requireTenantCredential` value (gates both the
|
||||
helm/cairnobs`'s `ingest.requireTenantCredential` value (gates both the
|
||||
credential-validation requirement and this mode split together, since
|
||||
write-routing is only meaningful once records actually carry a
|
||||
tenant_id to route on) and `docker-compose.yml`'s `enterprise-ingest`
|
||||
@@ -318,7 +318,7 @@ internal/saml/ crewjam/saml wiring: SP setup, login redirect, respons
|
||||
internal/session/ issues/validates signed session + RoleService tokens
|
||||
internal/authhandler/ POST /internal/authorize, GET /auth/features
|
||||
internal/loginhandler/ GET /auth/oidc/{login,callback} + GET /auth/saml/login + POST /auth/saml/acs -- the human login flow
|
||||
internal/rbacstore/ users/tenants/tenant_memberships/data_sources/dashboard_permissions CRUD (pgx against sentry_metadata)
|
||||
internal/rbacstore/ users/tenants/tenant_memberships/data_sources/dashboard_permissions CRUD (pgx against cairnobs_metadata)
|
||||
internal/tenantprovision/ real ClickHouse CREATE DATABASE/USER/GRANT
|
||||
internal/tenantcrd/ syncs -provision-tenant's real result into deploy/operator's Tenant CRD (K8s dynamic client, no cluster needed to test)
|
||||
internal/chrunner/ tenant-scoped api/querylang/executor.SQLRunner
|
||||
@@ -431,7 +431,7 @@ SEARCH_TOKEN=$(docker compose run --rm enterprise-auth -mint-service-token=searc
|
||||
```
|
||||
|
||||
```sh
|
||||
docker build -f Dockerfile -t sentry-enterprise-auth . # context is enterprise/, not the repo root
|
||||
docker build -f Dockerfile -t cairnobs-enterprise-auth . # context is enterprise/, not the repo root
|
||||
```
|
||||
|
||||
## Bootstrapping a tenant and its first human user
|
||||
@@ -484,7 +484,7 @@ comment already worries about). Changing a non-Owner role is just
|
||||
re-running `-grant-membership-*` with a different
|
||||
`-grant-membership-role` (`SetMembership`'s upsert already supports
|
||||
it). `dashboard_permissions` grants have no `enterprise-auth` flag and
|
||||
don't need one -- `sentryctl dashboards permissions list|grant|revoke`
|
||||
don't need one -- `cairnobsctl dashboards permissions list|grant|revoke`
|
||||
covers them over the HTTP endpoints `api/dashboards`' handler already
|
||||
exposes (`PUT`/`DELETE /dashboards/{id}/permissions/{userId}`,
|
||||
`GET .../permissions`), see `/cli/README.md`.
|
||||
@@ -514,8 +514,8 @@ curl -s http://localhost:8080/healthz
|
||||
`internal/tenantcrd` sync step is a documented no-op in this deployment
|
||||
shape, same as everywhere else this codebase has an "off unless
|
||||
configured" optional dependency. It only does anything in a real
|
||||
cluster with `deploy/helm/sentry`'s `tenantOperator.enabled=true` -- see
|
||||
`/deploy/helm/sentry/README.md`'s "Trying the two-tenant example."
|
||||
cluster with `deploy/helm/cairnobs`'s `tenantOperator.enabled=true` -- see
|
||||
`/deploy/helm/cairnobs/README.md`'s "Trying the two-tenant example."
|
||||
|
||||
`-provision-tenant` creates the tenant/data_source rows in rbacstore if
|
||||
they don't exist, provisions ClickHouse, persists the credentials, and
|
||||
@@ -529,8 +529,8 @@ to, see `tenantprovision.ProvisionClickHouse`'s doc comment).
|
||||
|---|---|
|
||||
| `HTTP_LISTEN_ADDR` | `:8082` |
|
||||
| `POSTGRES_ADDR` | `localhost:5432` |
|
||||
| `POSTGRES_DATABASE` | `sentry_metadata` |
|
||||
| `POSTGRES_USERNAME` | `sentry` |
|
||||
| `POSTGRES_DATABASE` | `cairnobs_metadata` |
|
||||
| `POSTGRES_USERNAME` | `cairnobs` |
|
||||
| `POSTGRES_PASSWORD` | (empty) |
|
||||
| `OIDC_ISSUER_URL` | (empty — OIDC discovery skipped if unset) |
|
||||
| `OIDC_CLIENT_ID` | (empty) |
|
||||
@@ -554,8 +554,8 @@ to, see `tenantprovision.ProvisionClickHouse`'s doc comment).
|
||||
| `CLICKHOUSE_ADMIN_PASSWORD` | (empty) |
|
||||
| `SEARCH_GRPC_ADDR` | `localhost:50052` |
|
||||
| `POSTGRES_ADDR` | `localhost:5432` |
|
||||
| `POSTGRES_DATABASE` | `sentry_metadata` |
|
||||
| `POSTGRES_USERNAME` | `sentry` |
|
||||
| `POSTGRES_DATABASE` | `cairnobs_metadata` |
|
||||
| `POSTGRES_USERNAME` | `cairnobs` |
|
||||
| `POSTGRES_PASSWORD` | (empty) |
|
||||
| `AUDIT_WRITER_USERNAME` | `audit_writer` |
|
||||
| `AUDIT_WRITER_PASSWORD` | (empty) |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Same shape as every other Go service's Dockerfile in this repo --
|
||||
# context must be the repo root (needs both enterprise/ and proto/, like
|
||||
# api/Dockerfile does for api/ + proto/), not enterprise/ alone.
|
||||
# docker build -f enterprise/cmd/enterprise-api/Dockerfile -t sentry-enterprise-api .
|
||||
# docker build -f enterprise/cmd/enterprise-api/Dockerfile -t cairnobs-enterprise-api .
|
||||
FROM golang:1.25-alpine AS builder
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
// keeps running plain api/cmd/api, unchanged; a real multi-tenant
|
||||
// deployment runs this one instead.
|
||||
//
|
||||
// Both Helm (deploy/helm/sentry/templates/api.yaml vs
|
||||
// Both Helm (deploy/helm/cairnobs/templates/api.yaml vs
|
||||
// enterprise-api.yaml) and docker-compose.yml (COMPOSE_PROFILES) now
|
||||
// make this the deployment-topology choice, not just a binary sitting
|
||||
// unused alongside api's -- see this repo's CLAUDE.md. `search`'s write
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# context must be the repo root (needs ingest/, proto/, and enterprise/,
|
||||
# like enterprise-api/Dockerfile does for api/ + proto/ + enterprise/),
|
||||
# not enterprise/ alone.
|
||||
# docker build -f enterprise/cmd/enterprise-ingest/Dockerfile -t sentry-enterprise-ingest .
|
||||
# docker build -f enterprise/cmd/enterprise-ingest/Dockerfile -t cairnobs-enterprise-ingest .
|
||||
FROM golang:1.25-alpine AS builder
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Command enterprise-ingest is the multi-tenant-aware alternative to
|
||||
// running `ingest -mode=consumer` -- reads the same shared
|
||||
// sentry.logs.raw Redpanda topic ingest/cmd/ingest's agent-facing
|
||||
// cairnobs.logs.raw Redpanda topic ingest/cmd/ingest's agent-facing
|
||||
// server half (PushBatch) produces onto (see that binary's doc
|
||||
// comment), but writes each record into its own tenant's dedicated
|
||||
// ClickHouse database (enterprise/internal/chwriter) instead of the one
|
||||
@@ -21,7 +21,7 @@
|
||||
// alongside) `ingest -mode=consumer` -- `ingest -mode=server` (the
|
||||
// agent-facing half, which tags records with a tenant_id via
|
||||
// TenantResolver) keeps running unchanged and unconditionally either
|
||||
// way; only which process consumes sentry.logs.raw and where it writes
|
||||
// way; only which process consumes cairnobs.logs.raw and where it writes
|
||||
// changes.
|
||||
package main
|
||||
|
||||
|
||||
@@ -125,8 +125,8 @@ func Load() (Config, error) {
|
||||
},
|
||||
Postgres: PostgresConfig{
|
||||
Addr: getenv("POSTGRES_ADDR", "localhost:5432"),
|
||||
Database: getenv("POSTGRES_DATABASE", "sentry_metadata"),
|
||||
Username: getenv("POSTGRES_USERNAME", "sentry"),
|
||||
Database: getenv("POSTGRES_DATABASE", "cairnobs_metadata"),
|
||||
Username: getenv("POSTGRES_USERNAME", "cairnobs"),
|
||||
Password: getenv("POSTGRES_PASSWORD", ""),
|
||||
},
|
||||
AI: AIConfig{
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
// section. Two independent defenses back the "no update/delete path
|
||||
// from the application layer" requirement -- both verified against a
|
||||
// live Postgres, not just written: audit_writer (this package's own
|
||||
// Postgres role, via its own connection pool, never the shared `sentry`
|
||||
// Postgres role, via its own connection pool, never the shared `cairnobs`
|
||||
// role every other store uses) has only INSERT+SELECT grants, and a
|
||||
// BEFORE UPDATE OR DELETE trigger (metadata/migrations/0015-0016)
|
||||
// rejects the operation for *any* role, including the table owner --
|
||||
// confirmed live: even `sentry` cannot UPDATE a row without first
|
||||
// confirmed live: even `cairnobs` cannot UPDATE a row without first
|
||||
// disabling the trigger, a privileged operation distinct from ordinary
|
||||
// application access.
|
||||
//
|
||||
|
||||
@@ -34,7 +34,7 @@ func testPool(t *testing.T, user, password string) *pgxpool.Pool {
|
||||
if addr == "" {
|
||||
t.Skip("AUDIT_TEST_POSTGRES_ADDR not set -- skipping live-Postgres integration test")
|
||||
}
|
||||
dsn := fmt.Sprintf("postgres://%s:%s@%s/sentry_metadata", user, password, addr)
|
||||
dsn := fmt.Sprintf("postgres://%s:%s@%s/cairnobs_metadata", user, password, addr)
|
||||
pool, err := pgxpool.New(context.Background(), dsn)
|
||||
if err != nil {
|
||||
t.Fatalf("opening pool: %v", err)
|
||||
@@ -65,7 +65,7 @@ func cleanupAuditLog(t *testing.T, adminPool *pgxpool.Pool) {
|
||||
|
||||
func TestAppendAndVerifyChainRealPostgres(t *testing.T) {
|
||||
writerPool := testPool(t, "audit_writer", os.Getenv("AUDIT_TEST_POSTGRES_PASSWORD"))
|
||||
adminPool := testPool(t, "sentry", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
adminPool := testPool(t, "cairnobs", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
cleanupAuditLog(t, adminPool)
|
||||
defer cleanupAuditLog(t, adminPool)
|
||||
|
||||
@@ -104,7 +104,7 @@ func TestAppendAndVerifyChainRealPostgres(t *testing.T) {
|
||||
// field on QueryAuditEntry -- matching that type's own doc comment.
|
||||
func TestQueryAPILoggerWritesAttributedToContextIdentity(t *testing.T) {
|
||||
writerPool := testPool(t, "audit_writer", os.Getenv("AUDIT_TEST_POSTGRES_PASSWORD"))
|
||||
adminPool := testPool(t, "sentry", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
adminPool := testPool(t, "cairnobs", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
cleanupAuditLog(t, adminPool)
|
||||
defer cleanupAuditLog(t, adminPool)
|
||||
|
||||
@@ -131,7 +131,7 @@ func TestQueryAPILoggerWritesAttributedToContextIdentity(t *testing.T) {
|
||||
|
||||
func TestQueryAPILoggerRefusesWithoutIdentity(t *testing.T) {
|
||||
writerPool := testPool(t, "audit_writer", os.Getenv("AUDIT_TEST_POSTGRES_PASSWORD"))
|
||||
adminPool := testPool(t, "sentry", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
adminPool := testPool(t, "cairnobs", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
cleanupAuditLog(t, adminPool)
|
||||
defer cleanupAuditLog(t, adminPool)
|
||||
|
||||
@@ -149,7 +149,7 @@ func TestQueryAPILoggerRefusesWithoutIdentity(t *testing.T) {
|
||||
// confidence/accepted/edited fields that don't have dedicated columns.
|
||||
func TestAIInteractionLoggerWritesAttributedToContextIdentity(t *testing.T) {
|
||||
writerPool := testPool(t, "audit_writer", os.Getenv("AUDIT_TEST_POSTGRES_PASSWORD"))
|
||||
adminPool := testPool(t, "sentry", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
adminPool := testPool(t, "cairnobs", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
cleanupAuditLog(t, adminPool)
|
||||
defer cleanupAuditLog(t, adminPool)
|
||||
|
||||
@@ -199,7 +199,7 @@ func TestAIInteractionLoggerWritesAttributedToContextIdentity(t *testing.T) {
|
||||
|
||||
func TestAIInteractionLoggerRefusesWithoutIdentity(t *testing.T) {
|
||||
writerPool := testPool(t, "audit_writer", os.Getenv("AUDIT_TEST_POSTGRES_PASSWORD"))
|
||||
adminPool := testPool(t, "sentry", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
adminPool := testPool(t, "cairnobs", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
cleanupAuditLog(t, adminPool)
|
||||
defer cleanupAuditLog(t, adminPool)
|
||||
|
||||
@@ -216,7 +216,7 @@ func TestAIInteractionLoggerRefusesWithoutIdentity(t *testing.T) {
|
||||
// would also pass.
|
||||
func TestVerifyChainDetectsTampering(t *testing.T) {
|
||||
writerPool := testPool(t, "audit_writer", os.Getenv("AUDIT_TEST_POSTGRES_PASSWORD"))
|
||||
adminPool := testPool(t, "sentry", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
adminPool := testPool(t, "cairnobs", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
cleanupAuditLog(t, adminPool)
|
||||
defer cleanupAuditLog(t, adminPool)
|
||||
|
||||
@@ -270,7 +270,7 @@ func TestVerifyChainDetectsTampering(t *testing.T) {
|
||||
// unit test of the Go code alone.
|
||||
func TestAppendConcurrentWritesProduceAValidChain(t *testing.T) {
|
||||
writerPool := testPool(t, "audit_writer", os.Getenv("AUDIT_TEST_POSTGRES_PASSWORD"))
|
||||
adminPool := testPool(t, "sentry", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
adminPool := testPool(t, "cairnobs", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
cleanupAuditLog(t, adminPool)
|
||||
defer cleanupAuditLog(t, adminPool)
|
||||
|
||||
@@ -316,7 +316,7 @@ func TestAppendConcurrentWritesProduceAValidChain(t *testing.T) {
|
||||
// the previous checkpoint's hash.
|
||||
func TestCheckpointerRun(t *testing.T) {
|
||||
writerPool := testPool(t, "audit_writer", os.Getenv("AUDIT_TEST_POSTGRES_PASSWORD"))
|
||||
adminPool := testPool(t, "sentry", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
adminPool := testPool(t, "cairnobs", os.Getenv("AUDIT_TEST_ADMIN_PASSWORD"))
|
||||
cleanupAuditLog(t, adminPool)
|
||||
defer cleanupAuditLog(t, adminPool)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// chrunner.RunSQL resolves exactly one tenant per call from ctx (a
|
||||
// single request always belongs to one identity); WriteBatch resolves
|
||||
// per *record*, since one Kafka batch pulled off the shared
|
||||
// sentry.logs.raw topic can freely mix records from many different
|
||||
// cairnobs.logs.raw topic can freely mix records from many different
|
||||
// tenants -- see ingest/internal/grpcserver's doc comment for why
|
||||
// there's one shared topic, not topic-per-tenant.
|
||||
package chwriter
|
||||
|
||||
@@ -101,8 +101,8 @@ func Load() (Config, error) {
|
||||
HTTPListenAddr: getenv("HTTP_LISTEN_ADDR", ":8082"),
|
||||
Postgres: PostgresConfig{
|
||||
Addr: getenv("POSTGRES_ADDR", "localhost:5432"),
|
||||
Database: getenv("POSTGRES_DATABASE", "sentry_metadata"),
|
||||
Username: getenv("POSTGRES_USERNAME", "sentry"),
|
||||
Database: getenv("POSTGRES_DATABASE", "cairnobs_metadata"),
|
||||
Username: getenv("POSTGRES_USERNAME", "cairnobs"),
|
||||
Password: getenv("POSTGRES_PASSWORD", ""),
|
||||
},
|
||||
OIDC: OIDCConfig{
|
||||
|
||||
@@ -74,26 +74,26 @@ func Load() (Config, error) {
|
||||
ClickHouseAddr: getenv("CLICKHOUSE_ADDR", "localhost:9000"),
|
||||
Postgres: PostgresConfig{
|
||||
Addr: getenv("POSTGRES_ADDR", "localhost:5432"),
|
||||
Database: getenv("POSTGRES_DATABASE", "sentry_metadata"),
|
||||
Username: getenv("POSTGRES_USERNAME", "sentry"),
|
||||
Database: getenv("POSTGRES_DATABASE", "cairnobs_metadata"),
|
||||
Username: getenv("POSTGRES_USERNAME", "cairnobs"),
|
||||
Password: getenv("POSTGRES_PASSWORD", ""),
|
||||
},
|
||||
Redpanda: RedpandaConfig{
|
||||
Brokers: strings.Split(getenv("REDPANDA_BROKERS", "localhost:9092"), ","),
|
||||
// Same default topic ingest/internal/config uses -- this
|
||||
// binary reads the identical shared sentry.logs.raw topic
|
||||
// binary reads the identical shared cairnobs.logs.raw topic
|
||||
// ingest/cmd/ingest's server half (agent-facing PushBatch)
|
||||
// produces onto; there's no per-tenant topic, see
|
||||
// ingest/internal/grpcserver's doc comment.
|
||||
Topic: getenv("REDPANDA_TOPIC", "sentry.logs.raw"),
|
||||
Topic: getenv("REDPANDA_TOPIC", "cairnobs.logs.raw"),
|
||||
// A distinct consumer group from ingest/cmd/ingest's own
|
||||
// default ("sentry-ingest") -- this binary and a
|
||||
// default ("cairnobs-ingest") -- this binary and a
|
||||
// single-tenant `ingest -mode=consumer` must never share a
|
||||
// group (each message would only ever reach one of them,
|
||||
// silently splitting traffic) even though in practice a
|
||||
// real multi-tenant deployment runs this binary *instead
|
||||
// of*, not alongside, `ingest -mode=consumer`.
|
||||
ConsumerGroup: getenv("REDPANDA_CONSUMER_GROUP", "sentry-enterprise-ingest"),
|
||||
ConsumerGroup: getenv("REDPANDA_CONSUMER_GROUP", "cairnobs-enterprise-ingest"),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// role schema (metadata/migrations/0017-0021) described in
|
||||
// /docs/phase-4-rbac-design.md: users (global SSO identity), tenants,
|
||||
// and tenant_memberships (per-tenant role). It uses the same shared
|
||||
// "sentry" Postgres role/pool every other metadata store does (unlike
|
||||
// "cairnobs" Postgres role/pool every other metadata store does (unlike
|
||||
// enterprise/internal/audit's deliberately separate, narrower-granted
|
||||
// pool) -- ordinary read/write CRUD on control-plane config, not an
|
||||
// append-only ledger, so it has no analogous reason to restrict its own
|
||||
|
||||
@@ -29,7 +29,7 @@ func testStore(t *testing.T) *Store {
|
||||
t.Skip("RBACSTORE_TEST_POSTGRES_ADDR not set -- skipping live-Postgres integration test")
|
||||
}
|
||||
password := os.Getenv("RBACSTORE_TEST_POSTGRES_PASSWORD")
|
||||
dsn := fmt.Sprintf("postgres://sentry:%s@%s/sentry_metadata", password, addr)
|
||||
dsn := fmt.Sprintf("postgres://cairnobs:%s@%s/cairnobs_metadata", password, addr)
|
||||
pool, err := pgxpool.New(context.Background(), dsn)
|
||||
if err != nil {
|
||||
t.Fatalf("opening pool: %v", err)
|
||||
|
||||
@@ -27,7 +27,7 @@ func TestNewRejectsMissingConfig(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNewRejectsMissingIDPMetadata(t *testing.T) {
|
||||
_, err := New(Config{EntityID: "https://sentry.example.com/saml/metadata", ACSURL: "https://sentry.example.com/saml/acs"})
|
||||
_, err := New(Config{EntityID: "https://cairnobs.example.com/saml/metadata", ACSURL: "https://cairnobs.example.com/saml/acs"})
|
||||
if err == nil {
|
||||
t.Fatalf("expected an error when IDPMetadata is missing")
|
||||
}
|
||||
@@ -40,8 +40,8 @@ func TestNewRejectsMissingIDPMetadata(t *testing.T) {
|
||||
// redirect rather than just "the code compiles."
|
||||
func TestLoginURLBuildsAgainstRealIDPMetadata(t *testing.T) {
|
||||
sp, err := New(Config{
|
||||
EntityID: "https://sentry.example.com/saml/metadata",
|
||||
ACSURL: "https://sentry.example.com/saml/acs",
|
||||
EntityID: "https://cairnobs.example.com/saml/metadata",
|
||||
ACSURL: "https://cairnobs.example.com/saml/acs",
|
||||
IDPMetadata: fakeIDPMetadata(),
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user