Skip to content

Commit 0351261

Browse files
Remove shared policy fragment setup
1 parent 0bb5a22 commit 0351261

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

samples/authX-pro/create.ipynb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,8 @@
5454
" 'hr_member_role_id': 'HRMemberRoleId'\n",
5555
"}, sample_folder)\n",
5656
"\n",
57-
"# TODO: These shared policies may be better applied as part of each infrastructure deployments. \n",
58-
"from apimtypes import _get_project_root\n",
59-
"project_root = _get_project_root()\n",
60-
"pf_authz_match_any_xml = utils.read_policy_xml(str(project_root / 'shared' / 'apim-policies' / 'fragments' / 'pf-authz-match-any.xml'))\n",
61-
"pf_http_response_200_xml = utils.read_policy_xml(str(project_root / 'shared' / 'apim-policies' / 'fragments' / 'pf-http-response-200.xml'))\n",
62-
"\n",
6357
"pfs: List[PolicyFragment] = [\n",
64-
" PolicyFragment('AuthX-HR-Member', pf_authx_hr_member_xml, 'Authenticates and authorizes HR members.'),\n",
65-
" PolicyFragment('AuthZ-Match-Any', pf_authz_match_any_xml, 'Authorizes if any of the specified roles match the JWT role claims.'),\n",
66-
" PolicyFragment('Http-Response-200', pf_http_response_200_xml, 'Returns a 200 OK response for the current HTTP method.')\n",
58+
" PolicyFragment('AuthX-HR-Member', pf_authx_hr_member_xml, 'Authenticates and authorizes HR members.')\n",
6759
"]\n",
6860
"\n",
6961
"# 5) Define the Products\n",

samples/secure-blob-access/create.ipynb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,9 @@
5656
"\n",
5757
"pf_create_sas_token_xml = utils.read_policy_xml('pf-create-sas-token.xml', sample_name = sample_folder)\n",
5858
"pf_check_blob_existence_via_mi = utils.read_policy_xml('pf-check-blob-existence-via-managed-identity.xml', sample_name = sample_folder)\n",
59-
"# TODO: These shared policies may be better applied as part of each infrastructure deployments. \n",
60-
"from apimtypes import _get_project_root\n",
61-
"project_root = _get_project_root()\n",
62-
"pf_authz_match_any_xml = utils.read_policy_xml(str(project_root / 'shared' / 'apim-policies' / 'fragments' / 'pf-authz-match-any.xml'))\n",
6359
"\n",
6460
"pfs: List[PolicyFragment] = [\n",
6561
" PolicyFragment('AuthX-HR-Member', pf_authx_hr_member_xml, 'Authenticates and authorizes users with HR Member role.'),\n",
66-
" PolicyFragment('AuthZ-Match-Any', pf_authz_match_any_xml, 'Authorizes if any of the specified roles match the JWT role claims.'),\n",
6762
" PolicyFragment('Create-Sas-Token', pf_create_sas_token_xml, 'Creates a SAS token to use with access to a blob.'),\n",
6863
" PolicyFragment('Check-Blob-Existence-via-Managed-Identity', pf_check_blob_existence_via_mi, 'Checks whether the specified blob exists at the blobUrl. A boolean value for blobExists will be available afterwards.')\n",
6964
"]\n",

0 commit comments

Comments
 (0)