From 9cdad19be06c700398700ace1fb863df5275f8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rune=20T=C3=B8mmer=C3=A5s=20Larsen?= Date: Fri, 11 Oct 2024 11:21:19 +0200 Subject: [PATCH] Feaute/docsupdatesysuser (#1823) * docs update * Updates --- .../what-do-you-get/systemuser/_index.nb.md | 4 +- .../altinn-platform-authentication-v1.json | 213 +++++++++++++----- .../swagger/altinn-resource-registry-v1.json | 190 +++++++++++++++- 3 files changed, 341 insertions(+), 66 deletions(-) diff --git a/content/authentication/what-do-you-get/systemuser/_index.nb.md b/content/authentication/what-do-you-get/systemuser/_index.nb.md index c2b0be6fd4f..8de4bfb8734 100644 --- a/content/authentication/what-do-you-get/systemuser/_index.nb.md +++ b/content/authentication/what-do-you-get/systemuser/_index.nb.md @@ -1,6 +1,6 @@ --- title: Systembruker -description: En stor del av bruken av Altinn er via API fra fagsystemer. Dette er programvare som har integrert seg Altinns API og man fra programvare kan f.eks. sende inn skjema eller hente ut meldinger av forskjellig art. +description: En stor del av kommunikasjonen mellom det offentlige og næringslivet skjer via API i Altinn og andre hos andre platformleverandører i det offentlige. tags: [platform, authentication] toc: false weight: 1 @@ -11,6 +11,8 @@ aliases: {{}} Under arbeid. Ting kan endres. Vi tar gjerne imot innspill. {{}} + + Omtrent 50% av skjematrafikken kommer via API, med enkelte tjenester som har nesten 100% fra fagsystemer. Nye autentiserings- og autorisasjonsmekanismer utvikles nå for maskin-til-maskin-integrasjon på Altinn-plattformen og andre offentlige API-er. diff --git a/static/swagger/altinn-platform-authentication-v1.json b/static/swagger/altinn-platform-authentication-v1.json index b7b426a8cde..877e6cd723c 100644 --- a/static/swagger/altinn-platform-authentication-v1.json +++ b/static/swagger/altinn-platform-authentication-v1.json @@ -345,17 +345,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } } } @@ -387,17 +387,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } } } @@ -446,17 +446,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } } } @@ -496,17 +496,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } } } @@ -548,17 +548,110 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/CreateRequestSystemUserResponse" + "$ref": "#/components/schemas/RequestSystemResponse" + } + } + } + } + } + } + }, + "/systemuser/request/vendor/bysystem/{systemId}": { + "get": { + "tags": [ + "RequestSystemUser" + ], + "summary": "Retrieves a list of Status-Response-model for all Requests that the Vendor has for a given system they own.", + "parameters": [ + { + "name": "systemId", + "in": "path", + "description": "The system the Vendor wants the list for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/RequestSystemResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestSystemResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RequestSystemResponse" + } + } + } + } + } + } + }, + "/systemuser/request/{party}/{requestId}/reject": { + "post": { + "tags": [ + "RequestSystemUser" + ], + "summary": "Rejects the systemuser request", + "parameters": [ + { + "name": "party", + "in": "path", + "description": "the partyId", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requestId", + "in": "path", + "description": "The UUID of the request to be rejected", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/RequestSystemResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestSystemResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RequestSystemResponse" } } } @@ -1264,49 +1357,6 @@ }, "additionalProperties": false }, - "CreateRequestSystemUserResponse": { - "required": [ - "id", - "partyOrgNo", - "rights", - "status", - "systemId" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "externalRef": { - "type": "string", - "nullable": true - }, - "systemId": { - "minLength": 1, - "type": "string" - }, - "partyOrgNo": { - "minLength": 1, - "type": "string" - }, - "rights": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Right" - } - }, - "status": { - "minLength": 1, - "type": "string" - }, - "redirectUrl": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, "DiscoveryDocument": { "type": "object", "properties": { @@ -1609,6 +1659,53 @@ }, "additionalProperties": false }, + "RequestSystemResponse": { + "required": [ + "id", + "partyOrgNo", + "rights", + "status", + "systemId" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "externalRef": { + "type": "string", + "nullable": true + }, + "systemId": { + "minLength": 1, + "type": "string" + }, + "partyOrgNo": { + "minLength": 1, + "type": "string" + }, + "rights": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Right" + } + }, + "status": { + "minLength": 1, + "type": "string" + }, + "redirectUrl": { + "type": "string", + "nullable": true + }, + "confirmUrl": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, "Right": { "type": "object", "properties": { diff --git a/static/swagger/altinn-resource-registry-v1.json b/static/swagger/altinn-resource-registry-v1.json index 67bef95ec39..5223b3d444c 100644 --- a/static/swagger/altinn-resource-registry-v1.json +++ b/static/swagger/altinn-resource-registry-v1.json @@ -56,8 +56,7 @@ "security": [ { "oauth2": [ - "AccessListRead", - "Admin" + "PlatformComponentOnly" ] } ] @@ -1579,7 +1578,7 @@ "security": [ { "oauth2": [ - "StudioDesignerAccess" + "Admin" ] } ] @@ -1624,7 +1623,50 @@ "security": [ { "oauth2": [ - "StudioDesignerAccess" + "Admin" + ] + } + ] + } + }, + "/altinn2export/setserviceeditionexpired": { + "get": { + "tags": [ + "Altinn2Export" + ], + "summary": "Sets a given service expired to hide delegation functionality. Proxy for bridge functionality. Called by Altinn Studio and used as part of the migration of delegation process", + "parameters": [ + { + "name": "externalServiceCode", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "externalServiceEditionCode", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "oauth2": [ + "Admin" ] } ] @@ -1880,6 +1922,7 @@ } ], "requestBody": { + "description": "The XACML policy file", "content": { "multipart/form-data": { "schema": { @@ -1935,6 +1978,7 @@ } ], "requestBody": { + "description": "The XACML policy file", "content": { "multipart/form-data": { "schema": { @@ -2106,6 +2150,56 @@ } } }, + "/resource/updated": { + "get": { + "tags": [ + "Resource" + ], + "summary": "Gets the updated resources since the provided last updated time (inclusive)", + "operationId": "updated", + "parameters": [ + { + "name": "since", + "in": "query", + "description": "Date time used for filtering", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "token", + "in": "query", + "description": "Opaque continuation token containing ResourceUrn,SubjectUrn pair to skip past on rows matching \"since\" exactly", + "schema": { + "$ref": "#/components/schemas/UpdatedResourceSubjectsContinuationTokenOpaque" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of pairs returned (1-1000, default: 1000)", + "schema": { + "type": "integer", + "format": "int32", + "default": 1000 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatedResourceSubjectPaginated" + } + } + } + } + } + } + }, "/resource/orgs": { "get": { "tags": [ @@ -3017,6 +3111,14 @@ "type": "integer", "format": "int32" }, + "ResourceAccessListMode": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "format": "int32" + }, "ResourceIdentifier": { "type": "object", "additionalProperties": false @@ -3174,8 +3276,8 @@ }, "nullable": true }, - "limitedByRRR": { - "type": "boolean" + "accessListMode": { + "$ref": "#/components/schemas/ResourceAccessListMode" }, "selfIdentifiedUserEnabled": { "type": "boolean" @@ -3208,7 +3310,8 @@ "properties": { "value": { "type": "string", - "description": "Gets the inner value." + "description": "Gets the inner value.", + "nullable": true } }, "additionalProperties": false, @@ -3254,6 +3357,79 @@ "additionalProperties": false, "description": "A paginated Altinn.ResourceRegistry.Models.ListObject`1." }, + "UpdatedResourceSubject": { + "type": "object", + "properties": { + "subjectUrn": { + "type": "string", + "format": "uri", + "nullable": true + }, + "resourceUrn": { + "type": "string", + "format": "uri", + "nullable": true + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "deleted": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "UpdatedResourceSubjectPaginated": { + "required": [ + "data", + "links" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdatedResourceSubject" + }, + "description": "The items." + }, + "links": { + "$ref": "#/components/schemas/PaginatedLinks" + } + }, + "additionalProperties": false, + "description": "A paginated Altinn.ResourceRegistry.Models.ListObject`1." + }, + "UpdatedResourceSubjectsContinuationToken": { + "type": "object", + "properties": { + "resourceUrn": { + "type": "string", + "description": "The resourceUrn.", + "format": "uri", + "nullable": true + }, + "subjectUrn": { + "type": "string", + "description": "The subjectUrn.", + "format": "uri", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Continuation token for updated resource subjects. Used with \"since\" value to serve\r\nas tiebreaker when paginating over resource subjects having the same \"updatedAt\" value\r\nsplit across pages" + }, + "UpdatedResourceSubjectsContinuationTokenOpaque": { + "type": "string", + "properties": { + "value": { + "$ref": "#/components/schemas/UpdatedResourceSubjectsContinuationToken" + } + }, + "additionalProperties": false, + "description": "\r\n\r\n An opaque value is a value that can be transmitted to another party\r\n without divulging any type information or expectations about the value.\r\n \r\n\r\n\r\n Opaque values are typically usefull in APIs where the server wants to\r\n be able to return a value that the client later needs to send back to\r\n the server, but where the server does not want to expose the type of\r\n the value to the client. For instance, in a pagination scenario, the\r\n server can use an opaque int to do pagination by page number, while\r\n allowing itself to later change the implementation to use a cursor\r\n instead of a page number without breaking the API.\r\n " + }, "UpsertAccessListResourceConnectionDto": { "type": "object", "properties": {