Skip to content

feat(charm): support dual publishing modality (Kafka/gRPC) for permission updates #80

Open

Description

@shipperizer

Context & Motivation

With canonical/authorization-service#117 (merged), the authorization-service listener introduces configurable ingestion modes:

  • platform: consumes PermissionUpdateEnvelope messages from Kafka (existing behaviour).
  • standalone: exposes a gRPC PermissionIngestionService/IngestPermissionUpdate endpoint (port 9091) authenticated via Ory Hydra Bearer JWTs, requiring no Kafka broker.
  • hybrid: runs both transports concurrently.

tenant-service gains a matching standalone publishing mode in canonical/tenant-service#173, dispatching permission updates directly over gRPC when Kafka is not available. The authorization-service-listener-operator charm already implements standalone mode (canonical/authorization-service-listener-operator#3, ingestion_mode config, optional kafka relation, sts-info JWKS authentication).

The tenant-service charm must expose the same dual modality so deployments can operate without Kafka.

Depends on: canonical/tenant-service#173
See also: canonical/authorization-service#117, canonical/authorization-service-listener-operator#3

Proposed Changes

1. ingestion_mode / publishing-mode charm configuration

  • Introduce a charm config option (e.g. publishing_mode) mirroring the service-level modes:
    • platform (default): retain current Kafka publishing behaviour.
    • standalone: configure the workload with the authorization-service listener gRPC address and OAuth2 client credentials; do not require a Kafka relation.
  • When publishing_mode=standalone, render the corresponding workload environment (gRPC target address, Hydra token endpoint, client ID/secret from a Juju secret).

2. Integrations

  • Make the Kafka relation optional (or gate it on platform mode); the charm must not block when Kafka is absent in standalone mode.
  • Obtain the listener gRPC endpoint, either:
    • via a new relation to the authorization-service listener charm (preferred, e.g. an info relation exposing the gRPC address), or
    • via charm config as an interim measure.
  • Obtain client credentials for the Hydra token endpoint via the existing oauth integration or a Juju secret, so the workload can mint Bearer JWTs for the gRPC endpoint.

3. Status handling

  • Surface a blocked state with a clear message when the selected mode's prerequisites are missing (e.g. platform without Kafka, standalone without a listener address/credentials).

Acceptance Criteria

  • Charm config supports selecting between platform (Kafka) and standalone (gRPC) publishing modes.
  • platform mode preserves the existing behaviour without regression.
  • standalone mode deploys without a Kafka relation and wires the workload to the authorization-service listener gRPC endpoint with valid credentials.
  • Unit is blocked with an informative status when mode prerequisites are unmet.
  • Unit and integration tests cover both modes.

Activity

  1. syncronize-issues-to-jira commented on Nov 16, 2026

    @syncronize-issues-to-jira

    Thank you for reporting your feedback to us!

    The internal ticket has been created: https://warthogs.atlassian.net/browse/IAM-2428.

    This message was autogenerated

  2. self-assigned this
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions