diff --git a/code/API_definitions/dedicated-network-accesses.yaml b/code/API_definitions/dedicated-network-accesses.yaml index e4bd43f..2b670a0 100644 --- a/code/API_definitions/dedicated-network-accesses.yaml +++ b/code/API_definitions/dedicated-network-accesses.yaml @@ -25,6 +25,9 @@ paths: - Accesses summary: Get a list of device accesses to dedicated networks, optionally filtered for a given device and/or for a given dedicated network operationId: listNetworkAccesses + security: + - oAuth2: + - dedicated-network:accesses:read parameters: - name: networkId in: query @@ -59,6 +62,9 @@ paths: - Accesses summary: Create a device access to a dedicated network with given configuration operationId: createNetworkAccess + security: + - oAuth2: + - dedicated-network:access:create requestBody: content: application/json: @@ -96,6 +102,9 @@ paths: - Accesses summary: Get a device access to the dedicated network and its configuration operationId: readNetworkAccess + security: + - oAuth2: + - dedicated-network:access:read parameters: - name: accessId in: path @@ -128,6 +137,9 @@ paths: - Accesses summary: Delete a device access to the dedicated network operationId: deleteNetworkAccess + security: + - oAuth2: + - dedicated-network:access:delete parameters: - name: accessId in: path @@ -152,6 +164,17 @@ paths: $ref: "#/components/responses/Generic503" components: + securitySchemes: + oAuth2: + type: oauth2 + flows: + clientCredentials: + tokenUrl: https://api.example.com/oauth/token + scopes: + dedicated-network:accesses:read: Get a list of device accesses for networks + dedicated-network:access:create: Create a device access to a network with given configuration + dedicated-network:access:read: Get a device access for the network and its configuration + dedicated-network:access:delete: Delete a device access to a network parameters: x-correlator: diff --git a/code/API_definitions/dedicated-network-profiles.yaml b/code/API_definitions/dedicated-network-profiles.yaml index aa167f9..691e7f6 100644 --- a/code/API_definitions/dedicated-network-profiles.yaml +++ b/code/API_definitions/dedicated-network-profiles.yaml @@ -21,6 +21,9 @@ paths: - Profiles summary: Read dedicated network profiles operationId: readNetworkProfiles + security: + - oAuth2: + - dedicated-network:profiles:read parameters: - $ref: "#/components/parameters/x-correlator" responses: @@ -50,6 +53,9 @@ paths: - Profiles summary: Read a dedicated network profile operationId: readNetworkProfile + security: + - oAuth2: + - dedicated-network:profile:read parameters: - name: profileId in: path @@ -78,6 +84,15 @@ paths: $ref: "#/components/responses/Generic503" components: + securitySchemes: + oAuth2: + type: oauth2 + flows: + clientCredentials: + tokenUrl: https://api.example.com/oauth/token + scopes: + dedicated-network:profiles:read: Read network profiles + dedicated-network:profile:read: Read a network profile parameters: x-correlator: diff --git a/code/API_definitions/dedicated-network.yaml b/code/API_definitions/dedicated-network.yaml index ec0f6e5..841a41a 100644 --- a/code/API_definitions/dedicated-network.yaml +++ b/code/API_definitions/dedicated-network.yaml @@ -24,6 +24,9 @@ paths: - Networks summary: Get a list of dedicated networks operationId: listNetworks + security: + - oAuth2: + - dedicated-network:networks:read parameters: - $ref: "#/components/parameters/x-correlator" responses: @@ -52,6 +55,9 @@ paths: - Networks summary: Request to create a dedicated network operationId: createNetwork + security: + - oAuth2: + - dedicated-network:network:create requestBody: required: true content: @@ -137,6 +143,9 @@ paths: - Networks summary: Get the current information about a dedicated network operationId: readNetwork + security: + - oAuth2: + - dedicated-network:network:read parameters: - name: networkId in: path @@ -158,8 +167,11 @@ paths: delete: tags: - Networks - summary: Destroy a dedicated network + summary: Delete a dedicated network operationId: deleteNetwork + security: + - oAuth2: + - dedicated-network:network:delete parameters: - name: networkId in: path @@ -185,6 +197,17 @@ paths: components: securitySchemes: + oAuth2: + type: oauth2 + flows: + clientCredentials: + tokenUrl: https://api.example.com/oauth/token + scopes: + dedicated-network:networks:read: Get a list of networks + dedicated-network:network:create: Create a dedicated network + dedicated-network:network:read: Get the current information about a network + dedicated-network:network:delete: Delete a Network + notificationsBearerAuth: description: Bearer authentication for notifications type: http