Conditional Access Policies: `sessionControls.signInFrequency.frequencyInterval: "everyTime"` is not supported in v1.0 API
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- terraform
調査の方向性
リポジトリのファイルもテストも指定されていません。まず、v1.0 と Beta における signInFrequencySessionControl の Microsoft Graph メタデータがどのように取得・生成されるかを追跡し、次にドキュメントに記載された frequencyInterval の値と報告されている API の動作を比較してください。後続の PR #1417 を確認してください。done とは、ポリシーを Beta に固定することなく、v1.0 のサーフェスと Beta の動作が一貫して表現されている状態を意味します。
索引モデルが issue の本文から書いたものです。
説明
According to documentation, it should be possible to specify frequencyInterval: "everyTime" in the signInFrequencySessionControl model in the v1.0 API, however it seems this always returns a 400 response instructing to use the Beta endpoint.
Here is the request I am sending to create a conditional access policy:
POST /v1.0/identity/conditionalAccess/policies HTTP/1.1
Host: graph.microsoft.com
User-Agent: HashiCorp Terraform/1.7.5 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azuread/dev Hamilton (Go-http-client/1.1) pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Content-Length: 895
Accept: application/json; charset=utf-8; IEEE754Compatible=false
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJub...
Content-Type: application/json; charset=utf-8
Odata-Maxversion: 4.0
Odata-Version: 4.0
Accept-Encoding: gzip
{
"conditions": {
"applications": {
"includeApplications": [
"All"
],
"excludeApplications": [],
"includeUserActions": []
},
"clientAppTypes": [
"browser"
],
"devices": null,
"locations": {
"includeLocations": [
"All"
],
"excludeLocations": []
},
"platforms": {
"includePlatforms": [
"all"
],
"excludePlatforms": []
},
"servicePrincipalRiskLevels": [],
"signInRiskLevels": [],
"userRiskLevels": [],
"users": {
"includeUsers": [
"All"
],
"excludeUsers": [
"GuestsOrExternalUsers"
],
"includeGroups": [],
"excludeGroups": [],
"includeRoles": [],
"excludeRoles": [],
"includeGuestsOrExternalUsers": null,
"excludeGuestsOrExternalUsers": null
}
},
"displayName": "acctest-CONPOLICY-240625230036522960",
"grantControls": null,
"sessionControls": {
"applicationEnforcedRestrictions": {
"isEnabled": false
},
"cloudAppSecurity": null,
"disableResilienceDefaults": false,
"persistentBrowser": null,
"signInFrequency": {
"frequencyInterval": "everyTime",
"isEnabled": true
}
},
"state": "disabled"
}
And the response:
HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: application/json
Content-Encoding: gzip
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000
request-id: 320c19a9-5002-4a0e-9369-34ff925d0f94
client-request-id: 320c19a9-5002-4a0e-9369-34ff925d0f94
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"UK South","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"LN2PEPF000114CC"}}
Date: Tue, 25 Jun 2024 22:01:02 GMT
{
"error": {
"code": "BadRequest",
"message": "1038: The policy you are trying to create or update contains preview features. Use the Beta endpoint to create or update this policy.",
"innerError": {
"date": "2024-06-25T22:01:03",
"request-id": "320c19a9-5002-4a0e-9369-34ff925d0f94",
"client-request-id": "320c19a9-5002-4a0e-9369-34ff925d0f94"
}
}
}
If I send this same request to the beta endpoint, it is accepted:
POST /beta/identity/conditionalAccess/policies HTTP/1.1
Host: graph.microsoft.com
User-Agent: HashiCorp Terraform/1.7.5 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azuread/dev Hamilton (Go-http-client/1.1) pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Accept: application/json; charset=utf-8; IEEE754Compatible=false
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJub...
Content-Type: application/json; charset=utf-8
Odata-Maxversion: 4.0
Odata-Version: 4.0
Accept-Encoding: gzip
Connection: close
Content-Length: 895
{
"conditions": {
"applications": {
"includeApplications": [
"All"
],
"excludeApplications": [],
"includeUserActions": []
},
"clientAppTypes": [
"browser"
],
"devices": null,
"locations": {
"includeLocations": [
"All"
],
"excludeLocations": []
},
"platforms": {
"includePlatforms": [
"all"
],
"excludePlatforms": []
},
"servicePrincipalRiskLevels": [],
"signInRiskLevels": [],
"userRiskLevels": [],
"users": {
"includeUsers": [
"All"
],
"excludeUsers": [
"GuestsOrExternalUsers"
],
"includeGroups": [],
"excludeGroups": [],
"includeRoles": [],
"excludeRoles": [],
"includeGuestsOrExternalUsers": null,
"excludeGuestsOrExternalUsers": null
}
},
"displayName": "acctest-CONPOLICY-240625230036522960",
"grantControls": null,
"sessionControls": {
"applicationEnforcedRestrictions": {
"isEnabled": false
},
"cloudAppSecurity": null,
"disableResilienceDefaults": false,
"persistentBrowser": null,
"signInFrequency": {
"frequencyInterval": "everyTime",
"isEnabled": true
}
},
"state": "disabled"
}
This returns the expected 201 response:
HTTP/1.1 201 Created
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Content-Encoding: gzip
Location: https://na.prod.graph.ipc.msidentity.com/conditionalAccess/policies('22e89125-b41c-4d8a-9811-598cd3c70366')
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000
request-id: edcc0a03-c654-4bb5-8ae0-5568f6c6ed72
client-request-id: edcc0a03-c654-4bb5-8ae0-5568f6c6ed72
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"UK South","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"LN2PEPF000114C1"}}
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:networkAccess&from=2022-02-01&to=2022-03-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:networkAccess&from=2022-02-01&to=2022-03-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:networkAccess&from=2022-02-01&to=2022-03-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:networkAccess&from=2022-02-01&to=2022-03-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:networkAccess&from=2022-02-01&to=2022-03-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:networkAccess&from=2022-02-01&to=2022-03-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:networkAccess&from=2022-02-01&to=2022-03-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:networkAccess&from=2022-02-01&to=2022-03-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:networkAccess&from=2022-02-01&to=2022-03-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:networkAccess&from=2022-02-01&to=2022-03-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:secureAppSessionMode&from=2023-07-01&to=2023-08-01>;rel="deprecation";type="text/html"
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:secureAppSessionMode&from=2023-07-01&to=2023-08-01>;rel="deprecation";type="text/html"
Deprecation: Thu, 17 Feb 2022 23:59:59 GMT
Sunset: Sat, 17 Feb 2024 23:59:59 GMT
OData-Version: 4.0
Date: Tue, 25 Jun 2024 22:01:19 GMT
Connection: close
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#identity/conditionalAccess/policies/$entity",
"id": "22e89125-b41c-4d8a-9811-598cd3c70366",
"templateId": null,
"displayName": "acctest-CONPOLICY-240625230036522960",
"createdDateTime": "2024-06-25T22:01:18.2770637Z",
"modifiedDateTime": null,
"state": "disabled",
"grantControls": null,
"partialEnablementStrategy": null,
"conditions": {
"userRiskLevels": [],
"signInRiskLevels": [],
"clientAppTypes": [
"browser"
],
"times": null,
"deviceStates": null,
"devices": null,
"clientApplications": null,
"applications": {
"includeApplications": [
"All"
],
"excludeApplications": [],
"includeUserActions": [],
"includeAuthenticationContextClassReferences": [],
"applicationFilter": null
},
"users": {
"includeUsers": [
"All"
],
"excludeUsers": [
"GuestsOrExternalUsers"
],
"includeGroups": [],
"excludeGroups": [],
"includeRoles": [],
"excludeRoles": [],
"includeGuestsOrExternalUsers": null,
"excludeGuestsOrExternalUsers": null
},
"platforms": {
"includePlatforms": [
"all"
],
"excludePlatforms": []
},
"locations": {
"includeLocations": [
"All"
],
"excludeLocations": []
}
},
"sessionControls": {
"disableResilienceDefaults": null,
"applicationEnforcedRestrictions": null,
"cloudAppSecurity": null,
"persistentBrowser": null,
"continuousAccessEvaluation": null,
"secureSignInSession": null,
"signInFrequency": {
"value": null,
"type": null,
"authenticationType": "primaryAndSecondaryAuthentication",
"frequencyInterval": "everyTime",
"isEnabled": true
}
}
}
I picked this up after noticing that the Portal is using the Beta endpoint here, presumably due to this issue?
The problem with using the Beta endpoint, is that it locks a policy into using "beta features" and you can no longer use the v1.0 API to work with it.
Downstream issue: https://github.com/hashicorp/terraform-provider-azuread/pull/1417
- 主要言語
- XSLT
- スター
- 171
- フォーク
- 56
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 9
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-metadata のほかの issue
-
ToTriage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
microsoftgraph/msgraph-metadata#1217 ·
メンテナーはふだん 2 日以内に返信
-
ToTriage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoftgraph/msgraph-metadata#1192 ·
メンテナーはふだん 2 日以内に返信
-
ToTriage
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
microsoftgraph/msgraph-metadata#1233 ·
メンテナーはふだん 2 日以内に返信
-
`microsoft.graph.managedDevice` is missing a filter restrictions annotation.対応中かも @esidorenko-sl が 86 日前に担当しました。 オープンToTriage
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
microsoftgraph/msgraph-metadata#1193 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
ToTriage
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
microsoftgraph/msgraph-metadata#1169 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
microsoftgraph/msgraph-metadata の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
matomo-org/plugin-CustomAlerts#310 ·
メンテナーはふだん 1 日以内に返信
-
bug level:trivial
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
exoego/keycloak-fuhito#666 ·
メンテナーはふだん 1 日以内に返信
-
bug size:small
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fb55/htmlparser2#2579 ·
メンテナーはふだん 1 日以内に返信