canonical: https://jentic.com/apis/kpn.com/kpn

# Kpn FIAM-KPN

The FIAM-KPN API evaluates access requests for data-space participants and returns a permit, deny, or notApplicable decision with the policies that matched. It also validates data-sharing contracts between a data owner and a consumer, searches the party registry by name, EORI, role, or data space, and lets service providers create, update, and delete the contracts that govern access to their resources. Clients obtain a JWT bearer token from the token endpoint with a signed client assertion before calling the protected operations.

## For AI agents

Ask FIAM-KPN whether a subject may perform actions on a resource, validate a data-sharing contract, and look up registered parties and data spaces. Service providers can also create and maintain the access contracts behind those decisions.

## Scope

Does not handle end-user login, user directory management, or storage of the shared data itself. Use for data-space authorization decisions, contract checks, and party registry lookups only.

## Capabilities

- Request an authorization decision for a subject, resources, actions, and resource_type and receive permit, deny, or notApplicable with the matched policies
- Validate whether a data consumer's token grants a given action on a data owner's resource through an existing contract
- Search the party registry by name, eori, role, dataSpaceID, or certified_only and page through the results
- Create, update, and delete service-provider contracts that set the data_owner, service_consumer, resource, action, and validity dates
- List the contracts a service consumer holds and read any single contract by its id
- List the data spaces registered in the trust framework with their countries of operation

## Use cases

### Policy Decision Point for an Agent Gateway

Before an agent forwards a request to a protected data service, it asks FIAM-KPN for an authorization decision. The enforce operation takes the subject, the resources and actions requested, and the resource_type, and returns a decision of permit, deny, or notApplicable together with a decisionId, the matched policies, and an optional explanation, so the gateway can allow or block the call and log why.

Example prompt: Call POST `/api/v1/authorization/enforce` with subject 'did:example:consumer-42', resources ['shipments'], actions ['read'], and resource_type 'API', then allow the downstream call only if the decision is 'permit'

### Contract-Based Data Sharing Checks

Data owners share resources with consumers under explicit contracts. A service provider creates a contract naming the data_owner, service_consumer, resource, resource_type, action, and start and end dates, and later the contract validation operation confirms whether a consumer's data_consumer_token is allowed to perform an action on that resource, returning a simple allowed flag.

Example prompt: Create a contract with POST `/api/v1/service-providers/contracts` for a data_owner and service_consumer with start_date and end_date, then call POST `/api/v1/contracts/validate` with the consumer's data_consumer_token and confirm allowed is true

### Party Registry Lookup

Onboarding and due-diligence flows need to confirm who a counterparty is. The party search accepts filters such as name, eori, role, certified_only, active_only, and dataSpaceID, so an agent can find a registered organisation, check its adherence status, and then read the full record with the party id.

Example prompt: Call GET `/api/v1/parties` with eori 'NL123456789' and active_only true, then GET `/api/v1/parties/{party_id}` for the first match to read its roles and adherence

### AI Agent Access Governance via Jentic

An agent reaches FIAM-KPN through Jentic without wiring the client-assertion token exchange by hand. It searches by intent, receives the enforce or contract operation with its input schema, and runs it with the bearer token injected at execution time, so authorization checks become one step in a larger data-exchange workflow.

Example prompt: Search Jentic for 'check if a subject is authorized for a resource', load the enforce_authorization_post schema, and execute it with the subject, resources, actions, and resource_type

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/api/v1/authorization/enforce` | Request an authorization decision |
| POST | `/api/v1/contracts/validate` | Validate contract access for a consumer |
| GET | `/api/v1/parties` | Search registered parties |
| GET | `/api/v1/parties/{party_id}` | Get a party |
| POST | `/api/v1/service-providers/contracts` | Create a contract |
| PUT | `/api/v1/service-providers/contracts/{contract_id}` | Update a contract |
| GET | `/api/v1/dataspaces` | List data spaces |
| POST | `/api/v1/oauth/token` | Obtain an access token |

## Key resources

- **Authorization** — Evaluate access requests and return permit, deny, or notApplicable decisions with matched policies
- **Contracts** — Create, read, update, delete, and validate data-sharing contracts between data owners and service consumers
- **Parties** — Search the participant registry, read a party by id, and register new parties
- **Dataspaces** — List the data spaces registered in the trust framework
- **Authentication** — Exchange a signed client assertion for a JWT access token

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 47 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 74 / 100
  - Developer Experience & Jentic Compatibility: 69 / 100
  - AI-Readiness & Agent Experience: 63 / 100
  - Agent Usability: 94 / 100
  - Security: 75 / 100
  - AI Discoverability: 11 / 100
- **View full report:** https://jentic.com/apis/kpn.com/kpn/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring FIAM-KPN by hand means signing a client_assertion JWT with your certificate, exchanging it at the token endpoint, and refreshing the bearer token before each protected call. Through Jentic you install once, import FIAM-KPN from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** FIAM-KPN puts the contract id in the URL path (`/api/v1/service-providers/contracts/{contract_id}`), so a rule can pin your agent to one contract and the operations you pick. You choose that set, so destructive ones like contract deletion or party creation are not included unless you add them.
- **Credential handling:** Your FIAM-KPN credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'check if a subject is authorized' or 'search the party registry', and Jentic returns the matching FIAM-KPN operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Ory API** — Identity and permission platform with relationship-based permission checks
- **Auth0 Authentication API** — User login and token issuance for applications
- **Okta API** — Workforce directory, users, groups, and SSO

## FAQ

### What authentication does the FIAM-KPN API use?

Per its OpenAPI spec, the FIAM-KPN API uses the bearer_auth scheme: a JWT bearer token in the Authorization header. You get the token from POST `/api/v1/oauth/token` by sending grant_type, scope, client_id, client_assertion_type, and a client_assertion JWT signed with your client certificate. Through Jentic the credential is stored encrypted by your own Jentic One instance and injected at execution time.

### Can I get an authorization decision with the FIAM-KPN API?

Yes. Send subject, resources, actions, and resource_type to the enforce operation, as query parameters on GET or as a JSON body on POST, with optional attributes, issuer, service_provider, and license. The response carries a decision of permit, deny, or notApplicable, a decisionId, the matchedPolicies, an evaluationTimeMs value, and an optional explanation.

### What are the rate limits for the FIAM-KPN API?

The OpenAPI spec does not specify rate limits. Check the published FIAM-KPN definition at https://app.swaggerhub.com/apis/kpn/FIAM-KPN/0.1.1 or ask KPN for the limits that apply to your client.

### How do I check a consumer's contract access through Jentic with the FIAM-KPN API?

Search Jentic for 'validate a data sharing contract' and it returns the validate_contract_access operation with its input schema. Execute POST `/api/v1/contracts/validate` with data_owner, data_consumer_token, resource_type, resource_attribute, resource, and action, and read the allowed flag. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a FIAM-KPN MCP server?

You don't need an MCP server to give your agent the FIAM-KPN API. Jentic connects it directly from the API Directory: import it, store your credential once, and your agent calls it. Operations are found by intent when needed, so no extra tool definitions sit in the agent's context.

### Can I limit what my agent is allowed to do with the FIAM-KPN API?

Yes. A rule that allows only the enforce and contract-validation operations lets your agent ask for decisions and check contract access while it cannot create or delete contracts. If the agent should maintain one agreement, allow GET and PUT on that single contract id and nothing else. Every call goes through your own instance and is logged.
