Skip to content

Commit 3495dec

Browse files
OAS Update
1 parent 9603a40 commit 3495dec

1 file changed

Lines changed: 60 additions & 317 deletions

File tree

services/service-account/v2/service-account.json

Lines changed: 60 additions & 317 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,66 @@
603603
"title": "ServiceAccountKeyResponseWithKey",
604604
"type": "object"
605605
},
606+
"IntrospectJWTPayload": {
607+
"properties": {
608+
"token": {
609+
"type": "string"
610+
},
611+
"token_type_hint": {
612+
"type": "string"
613+
}
614+
},
615+
"required": [
616+
"token"
617+
],
618+
"title": "IntrospectRequestBody",
619+
"type": "object"
620+
},
621+
"IntrospectJWTResponse": {
622+
"properties": {
623+
"active": {
624+
"type": "boolean"
625+
},
626+
"aud": {
627+
"items": {
628+
"type": "string"
629+
},
630+
"type": "array"
631+
},
632+
"client_id": {
633+
"type": "string"
634+
},
635+
"exp": {
636+
"type": "integer"
637+
},
638+
"iat": {
639+
"type": "integer"
640+
},
641+
"iss": {
642+
"type": "string"
643+
},
644+
"jti": {
645+
"type": "string"
646+
},
647+
"scope": {
648+
"type": "string"
649+
},
650+
"sub": {
651+
"type": "string"
652+
},
653+
"token_type": {
654+
"type": "string"
655+
},
656+
"username": {
657+
"type": "string"
658+
}
659+
},
660+
"required": [
661+
"active"
662+
],
663+
"title": "IntrospectResponseBody",
664+
"type": "object"
665+
},
606666
"JWK": {
607667
"description": "JSON Web Key according to https://datatracker.ietf.org/doc/html/rfc7517#section-4",
608668
"properties": {
@@ -1229,323 +1289,6 @@
12291289
}
12301290
]
12311291
},
1232-
"/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/access-tokens": {
1233-
"get": {
1234-
"description": "Get all Access Tokens of a Service Account. The token itself is not returned, only the metadata about the access tokens. Access tokens are listed until they are expired. Revoked tokens are returned until expired.",
1235-
"operationId": "ListAccessTokens",
1236-
"responses": {
1237-
"200": {
1238-
"content": {
1239-
"application/json": {
1240-
"schema": {
1241-
"$ref": "#/components/schemas/ListAccessTokensResponse"
1242-
}
1243-
}
1244-
},
1245-
"description": "OK"
1246-
},
1247-
"400": {
1248-
"content": {
1249-
"application/json": {
1250-
"schema": {
1251-
"$ref": "#/components/schemas/Error"
1252-
}
1253-
}
1254-
},
1255-
"description": "Invalid User Token"
1256-
},
1257-
"401": {
1258-
"content": {
1259-
"application/json": {
1260-
"schema": {
1261-
"$ref": "#/components/schemas/AuthError"
1262-
}
1263-
}
1264-
},
1265-
"description": "Unauthorized"
1266-
},
1267-
"403": {
1268-
"content": {
1269-
"application/json": {
1270-
"examples": {
1271-
"Forbidden Example": {
1272-
"value": {
1273-
"error": "Forbidden",
1274-
"message": "Service Account does not belong to Project or no access to project",
1275-
"path": "/v1/path/which/returned/error",
1276-
"status": 403,
1277-
"timeStamp": "2019-08-24T14:15:22Z"
1278-
}
1279-
}
1280-
},
1281-
"schema": {
1282-
"$ref": "#/components/schemas/Error"
1283-
}
1284-
}
1285-
},
1286-
"description": "Service Account does not belong to Project or no access to project"
1287-
},
1288-
"404": {
1289-
"content": {
1290-
"application/json": {
1291-
"examples": {
1292-
"Not Found Example": {
1293-
"$ref": "#/components/examples/notfound"
1294-
}
1295-
},
1296-
"schema": {
1297-
"$ref": "#/components/schemas/Error"
1298-
}
1299-
}
1300-
},
1301-
"description": "Service Account not found"
1302-
}
1303-
},
1304-
"summary": "List Access Tokens of Service Account",
1305-
"x-stackit-authorization": {
1306-
"actions": [
1307-
"iam.service-account-token.list"
1308-
],
1309-
"resource-id": "serviceAccountEmail",
1310-
"resource-id-type": "dynamic",
1311-
"resource-type": "service-account"
1312-
}
1313-
},
1314-
"parameters": [
1315-
{
1316-
"description": "The ID of the project.",
1317-
"in": "path",
1318-
"name": "projectId",
1319-
"required": true,
1320-
"schema": {
1321-
"type": "string"
1322-
}
1323-
},
1324-
{
1325-
"description": "The email of the Service Account.",
1326-
"in": "path",
1327-
"name": "serviceAccountEmail",
1328-
"required": true,
1329-
"schema": {
1330-
"format": "email",
1331-
"type": "string"
1332-
}
1333-
}
1334-
],
1335-
"post": {
1336-
"description": "Create an Access Token for a Service Account. The service token can be then used for API calls. Save the response token, as it is not recoverable later. Token metadata can be requested until the token is not expired. A token cannot be created using another token from the same service account. Consider using service account keys instead as a more secure and automation friendly solution.",
1337-
"operationId": "CreateAccessToken",
1338-
"requestBody": {
1339-
"content": {
1340-
"application/json": {
1341-
"schema": {
1342-
"$ref": "#/components/schemas/CreateAccessTokenPayload"
1343-
}
1344-
}
1345-
},
1346-
"description": "Token request. Optional. If not specified the access token will be valid for 90days."
1347-
},
1348-
"responses": {
1349-
"201": {
1350-
"content": {
1351-
"application/json": {
1352-
"schema": {
1353-
"$ref": "#/components/schemas/AccessToken"
1354-
}
1355-
}
1356-
},
1357-
"description": "Created"
1358-
},
1359-
"400": {
1360-
"content": {
1361-
"application/json": {
1362-
"schema": {
1363-
"$ref": "#/components/schemas/Error"
1364-
}
1365-
}
1366-
},
1367-
"description": "Invalid User Token"
1368-
},
1369-
"401": {
1370-
"content": {
1371-
"application/json": {
1372-
"schema": {
1373-
"$ref": "#/components/schemas/AuthError"
1374-
}
1375-
}
1376-
},
1377-
"description": "Unauthorized"
1378-
},
1379-
"403": {
1380-
"content": {
1381-
"application/json": {
1382-
"examples": {
1383-
"Forbidden Example": {
1384-
"value": {
1385-
"error": "Forbidden",
1386-
"message": "Service Account does not belong to Project or no access to project",
1387-
"path": "/v1/path/which/returned/error",
1388-
"status": 403,
1389-
"timeStamp": "2019-08-24T14:15:22Z"
1390-
}
1391-
}
1392-
},
1393-
"schema": {
1394-
"$ref": "#/components/schemas/Error"
1395-
}
1396-
}
1397-
},
1398-
"description": "Service Account does not belong to Project or no access to project"
1399-
},
1400-
"404": {
1401-
"content": {
1402-
"application/json": {
1403-
"examples": {
1404-
"NotFound Example": {
1405-
"$ref": "#/components/examples/notfound"
1406-
}
1407-
},
1408-
"schema": {
1409-
"$ref": "#/components/schemas/Error"
1410-
}
1411-
}
1412-
},
1413-
"description": "Service Account not found"
1414-
}
1415-
},
1416-
"summary": "Create a new Access Token",
1417-
"x-stackit-authorization": {
1418-
"actions": [
1419-
"iam.service-account-token.create"
1420-
],
1421-
"resource-id": "serviceAccountEmail",
1422-
"resource-id-type": "dynamic",
1423-
"resource-type": "service-account"
1424-
}
1425-
}
1426-
},
1427-
"/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/access-tokens/{accessTokenId}": {
1428-
"delete": {
1429-
"description": "Revoke an Access Token. The access token is instantly revoked, any following calls with the token will be unauthorized. The token metadata is still stored until the expiration time.",
1430-
"operationId": "DeleteAccessToken",
1431-
"responses": {
1432-
"200": {
1433-
"description": "OK"
1434-
},
1435-
"400": {
1436-
"content": {
1437-
"application/json": {
1438-
"schema": {
1439-
"$ref": "#/components/schemas/Error"
1440-
}
1441-
}
1442-
},
1443-
"description": "Invalid User Token"
1444-
},
1445-
"401": {
1446-
"content": {
1447-
"application/json": {
1448-
"schema": {
1449-
"$ref": "#/components/schemas/AuthError"
1450-
}
1451-
}
1452-
},
1453-
"description": "Unauthorized"
1454-
},
1455-
"403": {
1456-
"content": {
1457-
"application/json": {
1458-
"examples": {
1459-
"Forbidden Example": {
1460-
"value": {
1461-
"error": "Forbidden",
1462-
"message": "Service Account does not belong to Project or Access Token does not belong to Service Account or no access to project",
1463-
"path": "/v1/path/which/returned/error",
1464-
"status": 403,
1465-
"timeStamp": "2019-08-24T14:15:22Z"
1466-
}
1467-
}
1468-
},
1469-
"schema": {
1470-
"$ref": "#/components/schemas/Error"
1471-
}
1472-
}
1473-
},
1474-
"description": "Service Account does not belong to Project or Access Token does not belong to Service Account or no access to project"
1475-
},
1476-
"404": {
1477-
"content": {
1478-
"application/json": {
1479-
"examples": {
1480-
"NotFound Example": {
1481-
"$ref": "#/components/examples/notfound"
1482-
}
1483-
},
1484-
"schema": {
1485-
"$ref": "#/components/schemas/Error"
1486-
}
1487-
}
1488-
},
1489-
"description": "Access Token not found"
1490-
},
1491-
"409": {
1492-
"content": {
1493-
"application/json": {
1494-
"examples": {
1495-
"Conflict Example": {
1496-
"$ref": "#/components/examples/conflict"
1497-
}
1498-
},
1499-
"schema": {
1500-
"$ref": "#/components/schemas/Error"
1501-
}
1502-
}
1503-
},
1504-
"description": "Access Token already revoked"
1505-
}
1506-
},
1507-
"summary": "Revoke Access Token",
1508-
"x-stackit-authorization": {
1509-
"actions": [
1510-
"iam.service-account-token.delete"
1511-
],
1512-
"resource-id": "serviceAccountEmail",
1513-
"resource-id-type": "dynamic",
1514-
"resource-type": "service-account"
1515-
}
1516-
},
1517-
"parameters": [
1518-
{
1519-
"description": "The ID of the project.",
1520-
"in": "path",
1521-
"name": "projectId",
1522-
"required": true,
1523-
"schema": {
1524-
"type": "string"
1525-
}
1526-
},
1527-
{
1528-
"description": "The ID of the Service Account.",
1529-
"in": "path",
1530-
"name": "serviceAccountEmail",
1531-
"required": true,
1532-
"schema": {
1533-
"format": "email",
1534-
"type": "string"
1535-
}
1536-
},
1537-
{
1538-
"description": "The ID of the Access Token.",
1539-
"in": "path",
1540-
"name": "accessTokenId",
1541-
"required": true,
1542-
"schema": {
1543-
"format": "uuid",
1544-
"type": "string"
1545-
}
1546-
}
1547-
]
1548-
},
15491292
"/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/federations": {
15501293
"get": {
15511294
"description": "List all the identity providers the service account is federated with.",

0 commit comments

Comments
 (0)