Repository navigation
Otoroshi version 18.1.0
Highlights
Fine grained rights for Otoroshi users (#2927)
- A right can now be limited to some kinds of entities with
authorized_entities_readandauthorized_entities_write: read everything in a team, but only write its backends and certificates for instance. - User rights policies define the rights of a backoffice user by email, either replacing the rights given by the auth module or capping them (
restrictmode). Super admins manage them in the backoffice (User rights policies), through the admin API, or asUserRightsPolicyKubernetes resources. A change applies on the user's next call, without a new login. - My admin apikey: any backoffice user can get a personal admin API key that always carries their current rights.
- A tenant admin can no longer modify or delete an admin or an API key that has more rights than itself (#2935).
One API key for several APIs (#2964)
A consumer can now call several APIs with a single client id and secret, each API through its own subscription, with its own plan, quotas and restrictions. The subscriptions share a credential of the consumer ("token_refs": [{ "shared": true }]) and each gets an alias key. Rotating, disabling or expiring the credential applies to every API at once, while suspending one subscription only cuts its own API.
Choose what your GitOps sources can deploy (#2933, #2929)
- Remote catalogs get a
kindssetting to include or exclude kinds of entities, globally and per organization or team. Refused entities are listed apart in the deploy report. - The Kubernetes job gets
crdsKinds(also available in the Helm chart values) to include or exclude CRD kinds, globally and per namespace. Excluded kinds are neither watched, written nor deleted.
APIs as code and deployment tracking (#2946, #2947)
- Any outside tool (a CI job, a GitOps pipeline...) can manage APIs as code by marking them with
"created_by": "external=<tool id>": every write is a deploy, and an API can be created directly inpublishedstate. - Deployments now record the plans and the version of the source: set
metadata.deployment_ref(a commit sha, a tag...) anddeployments[0].reftells you which version is live. The history size is configurable withOTOROSHI_APIS_DEPLOYMENTS_HISTORY_SIZE(5 by default).
Try a request from the admin API (#2951)
POST /apis/proxy.otoroshi.io/v1/routes/:id/_tryit sends a trial request through a route, or a route of an API, and returns the response along with the full execution report of the call: which plugin refused it, and why. The route designer tester, now scriptable from a CI.
Secrets masked in exported events (#2959)
Credential headers (Authorization, Cookie, the Otoroshi client secret headers...) and the secret fields of configurations are now masked in gateway, request flow, audit and alert events before any data exporter sees them. It is on by default, OTOROSHI_EVENTS_MASK_SECRETS=false turns it off.
API management
jwt,mtlsandoauth2-remoteplans can require a subscription (subscription_required). A subscription with aclient_idnow controls its consumer: disabling or deleting it cuts the consumer off (#2943, #2937).- The
restrictionsofkeyless,jwt,mtlsandoauth2-remoteplans are now enforced (#2944). - New plan options (#2945):
selection: JSON path conditions choosing which calls a plan applies to (a gold plan for tokens withtier: gold, a free plan for the others)counter_failure: deny or allow the calls when the quota counter cannot be reachedcircuit_breaker_scope: consumer: one circuit breaker per consumer, so one consumer breaking the backend does not open it for everyone
- API key plans can give their keys a
validitycounted from their first enablement (90 days from the subscription for instance), and a date set on a key is kept across updates (#2953). - mTLS plans can require both DN pattern lists to match (
dn_match: all) and name the authorities that must have signed the client certificate (trusted_ca_refs) (#2955). oauth2-remoteplans can check theissuerand theaudiencesof the tokens (#2954).- Gateway events now tell under which API, plan and subscription an API key was used (
identity.apiRef) (#2948).
for more details see the full changelog below
https://github.com/MAIF/otoroshi/milestone/142?closed=1
v18.0.1...v18.1.0
https://github.com/MAIF/otoroshi/releases/tag/v18.1.0
Added
- Fine grained authorization for otoroshi users (#2927 fixed by mathieuancelin)
- Let the user choose which entities a remote catalog can deploy (#2933 fixed by mathieuancelin)
- Let the user choose which entities (crds) can be read by the k8s job (#2929 fixed by mathieuancelin)
- The audit and alert events are exported with the secrets they carry, like the secret of the admin api key of every audited admin api call (#2959 fixed by mathieuancelin)
- One apikey for several Apis, each through a subscription of its own: alias keys (#2964 fixed by mathieuancelin)
Changed
- Update Playframework and SBT (#2916 fixed by mathieuancelin)
- Functional tests depend on the external echo backend request.otoroshi.io and fail randomly (#2822 fixed by mathieuancelin)
- On jwt, mtls and oauth2-remote plans any valid token or certificate is served, subscribed or not, and there is no way to require a subscription (#2943 fixed by mathieuancelin)
- The
restrictionsof a keyless, jwt, mtls or oauth2-remote plan are accepted and stored, but never enforced (#2944 fixed by mathieuancelin) - An api plan cannot say which calls it applies to, what to do when its quota counter is unreachable, or that each of its consumers gets its own circuit breaker (#2945 fixed by mathieuancelin)
- An Api deployment cannot say which version of its source it deployed, leaves the plans out, and only the last five are kept (#2946 fixed by mathieuancelin)
- The request tester and its execution report are only reachable with a backoffice session: the admin API cannot send a trial request through a route or an api and get its trace (#2951 fixed by mathieuancelin)
- An mtls plan accepts a certificate that matches its subject patterns or its issuer patterns, never requiring both, and cannot name the authority that must have signed it (#2955 fixed by mathieuancelin)
- A gateway event does not say under which plan and subscription the apikey of the call was used (#2948 fixed by mathieuancelin)
- An Api can be written as code, without a draft, only by a tool that pretends to be a remote catalog (#2947 fixed by mathieuancelin)
- The keys of an apikey plan can only get an absolute validUntil: no validity counted from the subscription, and a date written on a key is put back to the plan's at the next update (#2953 fixed by mathieuancelin)
Fixed
- ACME: POST /api/pki/certs/_letencrypt answers None.get although the certificate is issued and saved (#2908 fixed by mathieuancelin)
- PostgreSQL datastore: hset writes an unreadable value, which breaks hgetall and the cluster state export (#2907 fixed by mathieuancelin)
- Stripped path gets a double slash with the default backend root: plugins reading
relativeUrifail, and the Coraza WAF hangs (#2918 fixed by mathieuancelin) - UrlSanitizer collapses meaningful double slashes in the backend URL, query string included (#2919 fixed by mathieuancelin)
- A plugin throwing synchronously in a chain of plugins hangs the request until the circuit breaker times out (#2920 fixed by mathieuancelin)
- The content type of a backend response is lost when the backend does not send Content-Type in the canonical case (#2921 fixed by mathieuancelin)
- A tenant admin can rewrite or delete an admin or an apikey that has more rights than itself (#2935 fixed by mathieuancelin)
- Disabling or deleting a subscription to a jwt, mtls or oauth2-remote plan does not cut its consumer off (#2937 fixed by mathieuancelin)
- The consumers minted for a jwt, mtls, oauth2-remote or keyless plan are shared by every Api with a plan of the same id, and outlive their Api (#2938 fixed by mathieuancelin)
- A subscription that is
pending,deprecatedor in a custom status gets an enabled api key, so its consumer can call the api before the subscription is confirmed (#2940 fixed by mathieuancelin) - Deleting an apikey or oauth2-local subscription leaves its api key enabled, and its consumer keeps calling the api (#2941 fixed by mathieuancelin)
- An api with no published plan serves every caller: putting its last plan in staging, deprecating it or closing it opens its routes (#2942 fixed by mathieuancelin)
- Deprecating a plan cuts its consumers off, and an api whose plans are all deprecated serves anyone without counting (#2952 fixed by mathieuancelin)
- An oauth2-remote plan accepts any token signed with the keys of its auth module, whatever its issuer and its audience (#2954 fixed by mathieuancelin)
- The index template of otoroshi is never created on Elasticsearch 6 and 7.0 to 7.7: the v6 and v7 templates lost their stripMargin (#2960 fixed by mathieuancelin)
- A PUT on an entity that does not exist answers 401 unauthorized instead of 404, and a POST of an id already used 401 instead of 409 (#2949 fixed by mathieuancelin)
- A caller with narrowed rights can read the secret of a super admin apikey, and then act as super admin (#2957 fixed by mathieuancelin)
- The analytics runtime is never initialized when the first start writes the global config late: the stateful clients manager fails before it (#2961 fixed by )
- A plan extractor that does not identify the caller sends an error GatewayEvent for a call that then succeeds (#2962 fixed by mathieuancelin)
- A subscription can take over, disable or delete an api key it did not mint through its token_refs (#2965 fixed by mathieuancelin)
- helm upgrade fails with Helm 4: server-side apply conflicts with Otoroshi on the caBundle and failurePolicy of the admission webhooks (#2966 fixed by mathieuancelin)
- setnx is not atomic on the PostgreSQL and Cassandra datastores (#2969 fixed by mathieuancelin)
- W3CTracing: requests without traceparent are attached to another request's trace (#2970 fixed by j-pep1)
- Otoroshi cannot boot nor run on the cassandra datastore (#2975 fixed by mathieuancelin)
Documentation
- The kubernetes manifests shown in the documentation are a stale copy of kubernetes/, from before the kustomize reorganization (#2967 fixed by mathieuancelin)