-
Notifications
You must be signed in to change notification settings - Fork 366
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Hi Polaris team, can you help? Is there something basic I am missing or is this a known bug with a work-around recommended. Thanks in advance!
Polaris Catalog Issue Report
1. What version of Apache Polaris are you using?
- Version: polaris-bin-1.1.0-incubating (image assembled from release archive) (but same issue occurred when using 1.2.0 and 1.3.0.
- CLI binaries present:
/opt/polaris/bin/adminand/opt/polaris/bin/serverare present;/opt/polaris/bin/polarisCLI binary is not present in the image.
2. What operating system and processor architecture are you using?
- Environment: Kubernetes (Rancher Desktop)
- Namespace:
flink-sandbox - Operating System: (Host OS not specified; running in containerized environment)
- Processor Architecture: (Not specified; typical x86_64 for containers)
3. What did you do?
- Integrated Polaris with Flink and MinIO on Kubernetes.
- Set up authentication using INTERNAL/default mode, token broker
rsa-key-pair, and token refresh via CronJob. - Attempted to create a catalog using the management API:
- Obtained admin token via
/api/catalog/v1/oauth/tokens(scope=PRINCIPAL_ROLE:admin,grant_type=client_credentials). - Called
POST /api/management/v1/catalogson port 8181 with valid token and (optionally)X-Polaris-Realm: default-realm. - Example request body:
{ "catalog": { "name": "warehouse", "type": "INTERNAL", "properties": { "default-base-location": "s3a://warehouse/iceberg" }, "storageConfigInfo": { "storageType": "S3", "allowedLocations": ["s3a://warehouse"] } } }
- Obtained admin token via
4. What did you expect to see?
- Expected HTTP 201 response with catalog information.
- Expected successful end-to-end Flink ↔ Iceberg integration and passing integration tests.
5. What did you see instead?
- Received HTTP 500 error with
ContextNotActiveException(Quarkus CDI) in server logs. - Unable to create a catalog; integration tests blocked.
- Service exposes only port 8181; 8182 (health/management) is not exposed externally.
- CLI fallback unavailable (
/opt/polaris/bin/polarismissing;admintool lacks catalog commands).
Additional Details
Environment
- Auth mode: INTERNAL/default, token broker
rsa-key-pair, max token TTL 1h. - Secrets: RSA keys from
polaris-token-broker-keys; admin credentials frompolaris-admin-credentials. - Token refresh: CronJob posts to
/api/catalog/v1/oauth/tokensand writes access token topolaris-tokensecret (not mounted into Polaris container). - Storage/DB: Postgres backend; MinIO as object store (s3a).
Issue 1: Auth Behavior (resolved locally)
- Flink requests to Polaris REST catalog returned 401 even with
quarkus.oidc.enabled=falseandPOLARIS_AUTHENTICATION_ENABLED=false. - Workaround: Added env-based bearer token support in catalog manager (pyflink/catalog/polaris_manager.py#L121-L137). Token injected into Flink JM/TM as env
POLARIS_BEARER_TOKEN. - Result: Auth succeeded; subsequent failure was a 400 “Please specify a warehouse,” confirming token acceptance.
Issue 2: Management API Catalog Create Fails (blocking)
- Symptom:
POST /api/management/v1/catalogsreturns HTTP 500 withContextNotActiveException(Quarkus CDI). - Impact: Cannot create a catalog; Flink ↔ Iceberg integration tests blocked.
Hypothesis
- The error appears to be a server-side request context activation gap (e.g., missing
@ActivateRequestContextor scope on a producer used by management/warehouse resources), based on the observed Quarkus CDI exception and referenced documentation.
Requests for Community Guidance
- Known issues in 1.1.0/1.3.0 where management APIs throw
ContextNotActiveException? Any patches or backports? - Is there an official Polaris CLI binary for catalog operations that should ship in the binary distro?
- Should the management API be called on 8182 instead of 8181? Expected port exposure and required headers?
- Recommended workaround until a fix: is it safe to insert
@ActivateRequestContextaround management endpoints, or should the producer scope be adjusted elsewhere?
Next-Step Options Considered
- Patch Polaris source (prefer 1.3.0) to wrap management/warehouse resources with request context and rebuild image (if source access is available).
- Expose 8182 and retest (to confirm if the error persists or to aid diagnosis).
Artifacts and References
- Auth patch:
kubernetes/overlays/local/polaris-auth-patch.yaml - Token refresh CronJob:
kubernetes/overlays/local/polaris-token-refresh-cronjob.yaml - Deployment:
kubernetes/base/polaris/deployment.yaml - Service:
kubernetes/base/polaris/service.yaml - CLI binary absence confirmed via
kubectl exec deploy/polaris -- ls /opt/polaris/bin(onlyadmin,serverpresent).
Open Items
- Decode and share live token claims for validation (can provide if helpful).
- Confirm whether realm header is required beyond bearer token for management calls.
To Reproduce
No response
Actual Behavior
No response
Expected Behavior
No response
Additional context
No response
System information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working