Kuadrant / Kuadrant/kuadrant-console-plugin

Add OIDC authentication info to APIProduct

Open
#540 1 comment 0 reactions 0 assignees View on GitHub
needs design needs more discussion
Dominant language
TypeScript
Stars
10
Forks
65
Avg merge
2d 8h
Merged PRs (30d)
44

Description

## Description

Add OIDC authentication information display to the APIProduct details page to help API consumers understand how to authenticate with OIDC-protected APIs.

## Background

The developer-portal-controller now automatically discovers authentication requirements from AuthPolicy and surfaces them in the APIProduct status (implemented in https://github.com/Kuadrant/developer-portal-controller/pull/22).

## Available Data

For OIDC authentication, the controller provides:

```yaml
status:
discoveredAuthScheme:
authentication:
oidc-users:
jwt:
issuerUrl: https://keycloak.example.com/realms/myrealm
credentials:
authorizationHeader:
prefix: Bearer
oidcDiscovery:
tokenEndpoint: https://keycloak.example.com/realms/myrealm/protocol/openid-connect/token
```

**Key fields:**
- `status.discoveredAuthScheme.authentication..jwt.issuerUrl`: The OIDC issuer URL that validates tokens
- `status.discoveredAuthScheme.authentication..credentials`: Where the JWT token should be sent (typically Authorization header with "Bearer" prefix)
- `status.oidcDiscovery.tokenEndpoint`: The endpoint where consumers can obtain access tokens

## Design Options

### Option A: Add to existing Overview tab
### Option B: Create dedicated OIDC/Authentication tab

## Requirements

Display the following OIDC information:

1. **Identity Provider URL**: The OIDC issuer URL (`jwt.issuerUrl`)
2. **Token Endpoint**: The endpoint for obtaining access tokens (`oidcDiscovery.tokenEndpoint`)
3. **Example curl command**: Show how to obtain a token, e.g.:
```bash
curl -X POST https://keycloak.example.com/realms/myrealm/protocol/openid-connect/token \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET"
```

Contributor guide

Open the contributing guide

Research direction

Start at the APIProduct details page and trace how APIProduct status data is displayed. Use status.discoveredAuthScheme.authentication and status.oidcDiscovery to expose the issuer URL, token endpoint, and a client-credentials curl example; done means consumers can find all three items in the chosen Overview or dedicated authentication view.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.