diff --git a/README.md b/README.md index 3a7f1bb6c..44af13d1f 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ Probo is designed to be accessible, transparent, and community-driven. - Go 1.21+ - Node.js 22+ - Docker +- mkcert ### Quick Start @@ -83,6 +84,17 @@ The application will be available at: - Application: http://localhost:8080 +### Testing Custom Domains + +To test the custom domains feature locally, add the CNAME target to your hosts file: + +```bash +# Add this line to /etc/hosts (macOS/Linux) or C:\Windows\System32\drivers\etc\hosts (Windows) +127.0.0.1 custom.getprobo.com +``` + +This allows you to test custom trust center domains on your local machine. The CNAME target can be configured in `cfg/dev.yaml` under `custom-domains.cname-target`. + For detailed setup instructions, see our [Contributing Guide](CONTRIBUTING.md). ## 🏗️ Current Status diff --git a/cfg/dev.yaml b/cfg/dev.yaml index 524af4dde..80f896cd0 100644 --- a/cfg/dev.yaml +++ b/cfg/dev.yaml @@ -79,7 +79,7 @@ probod: directory: "https://localhost:14000/dir" email: "admin@getprobo.com" key-type: "EC256" - insecure-tls: true + root-ca: "" connectors: - provider: "slack" @@ -87,7 +87,7 @@ probod: config: client-id: "slack-client-id" client-secret: "thisisnotasecret" - redirect-uri: "http://localhost:8080/api/console/v1/connectors/complete" + redirect-uri: "https://localhost:8080/api/console/v1/connectors/complete" auth-url: "https://slack.com/oauth/v2/authorize" token-url: "https://slack.com/api/oauth.v2.access" scopes: diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 411d6ec54..cf4ad7a76 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -36,8 +36,8 @@ probod: pg: addr: "localhost:5432" - username: "probod" - password: "probod" + username: "postgres" + password: "postgres" database: "probod" pool-size: 100 ca-cert-bundle: | @@ -67,6 +67,10 @@ probod: scope: "trust_center_readonly" token-type: "trust_center_access" + trust-center: + http-addr: ":80" + https-addr: ":443" + aws: region: "us-east-1" bucket: "probod" @@ -74,29 +78,51 @@ probod: secret-access-key: "secret-key" endpoint: "http://127.0.0.1:9000" - mailer: - sender-name: "Probo" - sender-email: "no-reply@notification.getprobo.com" - smtp: - addr: "localhost:1025" - user: "smtp-username" - password: "smtp-password" - tls-required: true + notifications: + mailer: + sender-name: "Probo" + sender-email: "no-reply@notification.getprobo.com" + mailer-interval: 60 + smtp: + addr: "localhost:1025" + user: "smtp-username" + password: "smtp-password" + tls-required: false + slack: + sender-interval: 60 openai: api-key: "openai-api-key" temperature: 0.1 model-name: "gpt-4o" + custom-domains: + renewal-interval: 3600 + provision-interval: 30 + cname-target: "custom.getprobo.com" + acme: + directory: "https://localhost:14000/dir" + email: "admin@getprobo.com" + key-type: "EC256" + root-ca: "" + account-key: "" + root-ca: "" + connectors: - - name: "github" - type: "oauth2" + - provider: "slack" + protocol: "oauth2" config: - client-id: "github-client-id" - client-secret: "github-client-secret" + client-id: "slack-client-id" + client-secret: "slack-client-secret" redirect-uri: "https://localhost:8080/api/console/v1/connectors/complete" - auth-url: "https://github.com/login/oauth/authorize" - token-url: "https://github.com/login/oauth/access_token" + auth-url: "https://slack.com/oauth/v2/authorize" + token-url: "https://slack.com/api/oauth.v2.access" + scopes: + - "chat:write" + - "channels:join" + - "incoming-webhook" + settings: + signing-secret: "slack-signing-secret" ``` ## Telemetry and Observability @@ -271,13 +297,13 @@ PostgreSQL database server address and port. #### `pg.username` (string) -**Default**: `"probod"` +**Default**: `"postgres"` Database username for authentication. #### `pg.password` (string) -**Default**: `"probod"` +**Default**: `"postgres"` Database password for authentication. @@ -399,6 +425,20 @@ OAuth2 scope for trust center access. Type identifier for trust center access tokens. +### Trust Center Configuration + +#### `trust-center.http-addr` (string) + +**Default**: `":80"` + +Network address and port where the trust center HTTP server will listen for ACME HTTP-01 challenges and HTTP to HTTPS redirects. + +#### `trust-center.https-addr` (string) + +**Default**: `":443"` + +Network address and port where the trust center HTTPS server will listen for secure connections. This server handles custom domain routing with automatic TLS certificate management. + ### AWS Configuration #### `aws.region` (string) @@ -431,44 +471,58 @@ AWS secret access key for authentication. Custom S3-compatible endpoint URL. Useful for local development with MinIO or other S3-compatible services. -### Email Configuration +### Notifications Configuration -#### `mailer.sender-name` (string) +The `notifications` section configures how Probod sends notifications through various channels. + +#### `notifications.mailer.sender-name` (string) **Default**: `"Probo"` Display name for outgoing emails. -#### `mailer.sender-email` (string) +#### `notifications.mailer.sender-email` (string) **Default**: `"no-reply@notification.getprobo.com"` Email address used as the sender for outgoing emails. -#### `mailer.smtp.addr` (string) +#### `notifications.mailer.mailer-interval` (integer) + +**Default**: `60` + +Interval in seconds between checking for pending email notifications to send. + +#### `notifications.mailer.smtp.addr` (string) **Default**: `"localhost:1025"` SMTP server address and port. -#### `mailer.smtp.user` (string) +#### `notifications.mailer.smtp.user` (string) **Optional** Username for SMTP authentication. -#### `mailer.smtp.password` (string) +#### `notifications.mailer.smtp.password` (string) **Optional** Password for SMTP authentication. -#### `mailer.smtp.tls-required` (boolean) +#### `notifications.mailer.smtp.tls-required` (boolean) **Default**: `false` Whether TLS encryption is required for SMTP connections. +#### `notifications.slack.sender-interval` (integer) + +**Default**: `60` + +Interval in seconds between checking for pending Slack notifications to send. + ### OpenAI Integration #### `openai.api-key` (string) @@ -489,34 +543,89 @@ Temperature parameter for AI model responses (0.0 to 1.0). Lower values produce OpenAI model identifier to use for AI-powered features. +### Custom Domains Configuration + +The `custom-domains` section configures automatic TLS certificate management for custom trust center domains using ACME (Let's Encrypt). + +#### `custom-domains.renewal-interval` (integer) + +**Default**: `3600` + +Interval in seconds between checking for certificates that need renewal. + +#### `custom-domains.provision-interval` (integer) + +**Default**: `30` + +Interval in seconds between checking for domains that need certificate provisioning. + +#### `custom-domains.cname-target` (string) + +**Default**: `"custom.getprobo.com"` + +The CNAME target that custom domains should point to. This is used for domain validation and documentation. + +#### `custom-domains.acme.directory` (string) + +**Default**: `"https://localhost:14000/dir"` + +ACME directory URL. For local development, use Pebble at `"https://localhost:14000/dir"`. + +#### `custom-domains.acme.email` (string) + +**Default**: `"admin@getprobo.com"` + +Contact email address for ACME account registration and certificate expiration notifications. + +#### `custom-domains.acme.key-type` (string) + +**Default**: `"EC256"` + +Type of cryptographic key to use for certificates. Supported values: `"EC256"`, `"EC384"`, `"RSA2048"`, `"RSA4096"`. + +#### `custom-domains.acme.root-ca` (string) + +**Optional** + +PEM-encoded root CA certificate for ACME server validation. Required when using private ACME servers or testing with Pebble. + +#### `custom-domains.acme.account-key` (string) + +**Optional** + +PEM-encoded ACME account private key. If not provided, a new account key will be generated automatically. + ### External Connectors -The `connectors` section defines external service integrations for data import and synchronization. +The `connectors` section defines external service integrations. #### OAuth2 Connector Configuration ```yaml connectors: - - name: "service-name" - type: "oauth2" + - provider: "slack" + protocol: "oauth2" config: client-id: "oauth2-client-id" client-secret: "oauth2-client-secret" redirect-uri: "https://your-domain/api/console/v1/connectors/complete" - auth-url: "https://service.com/oauth/authorize" - token-url: "https://service.com/oauth/token" + auth-url: "https://slack.com/oauth/v2/authorize" + token-url: "https://slack.com/api/oauth.v2.access" scopes: - - "scope1" - - "scope2" + - "chat:write" + - "channels:join" + - "incoming-webhook" + settings: + signing-secret: "slack-signing-secret" ``` -##### `connectors[].name` (string) +##### `connectors[].provider` (string) **Required** -Unique identifier for the connector instance. +Service provider name. Supported values: `"slack"`. -##### `connectors[].type` (string) +##### `connectors[].protocol` (string) **Required** @@ -558,6 +667,14 @@ OAuth2 token exchange endpoint URL. List of OAuth2 scopes to request during authorization. +##### `connectors[].settings` (object) + +**Optional** + +Additional provider-specific settings. For Slack connectors, this includes: + +- `signing-secret` (string): Slack signing secret for webhook verification. + ## Troubleshooting ### Common Configuration Issues diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index d143f0af1..ad9980b6a 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -48,24 +48,30 @@ services: - minio postgres: - image: postgres:15 + image: postgres:17.4 + shm_size: 1g + command: > + postgres -c "shared_buffers=4GB" + -c "max_connections=200" + -c "log_statement=all" environment: - POSTGRES_DB: probod - POSTGRES_USER: probod - POSTGRES_PASSWORD: probod + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres volumes: - postgres_data:/var/lib/postgresql/data ports: - "5432:5432" minio: - image: minio/minio:latest - command: server /data --console-address ":9001" + image: quay.io/minio/minio + entrypoint: sh + command: | + -c 'mkdir -p /var/lib/minio/probod && minio server --json --console-address :9001 /var/lib/minio' environment: MINIO_ROOT_USER: probod MINIO_ROOT_PASSWORD: thisisnotasecret volumes: - - minio_data:/data + - minio_data:/var/lib/minio ports: - "9000:9000" - "9001:9001" @@ -191,8 +197,8 @@ Create a PostgreSQL database for Probo: ```sql CREATE DATABASE probod; -CREATE USER probod WITH PASSWORD 'your_secure_password'; -GRANT ALL PRIVILEGES ON DATABASE probod TO probod; +CREATE USER postgres WITH PASSWORD 'your_secure_password'; +GRANT ALL PRIVILEGES ON DATABASE probod TO postgres; ``` ### 2. Configuration @@ -206,7 +212,7 @@ probod: pg: addr: "localhost:5432" - username: "probod" + username: "postgres" password: "your_secure_password" database: "probod"