ã覧ããã ããããã¨ããããã¾ãã
çæ§ã¯ RFC7644 SCIM ã¨å¼ã°ããä»æ§ã¯ãåãã§ããããã SCIMã¨ã¯"System for Cross-domain Identity Management" ã®ç¥ã§ãã·ã¹ãã éã§ã®ID管çãèªååããæ©è½ã§ãã ãã®æ©è½ãå®è£ ããã¨ãMicrosoft Entra ID(æ§Azure AD)ãOktaãªã©ã®ID管çã·ã¹ãã ã§ã®ã¦ã¼ã¶ã¼æ å ±ã®å¤æ´ãèªåçã«é£æºå ã®ã·ã¹ãã ã«åæ ããããã¨ãã§ãã¾ãã
Microsoft Entra IDãOktaãªã©Id管çã·ã¹ãã ã¯é£æºç¨ã®ã«ã¿ãã°ãå ¬éãã¦ãããæ°ã¯ãªãã¯ã§é£æºããããã¨ãã§ãã¾ãã
æ¬è¨äºã§ã¯SCIMãå®è£ ããããã®è¦ä»¶æ¤è¨ããMicrosoft Entra ID, Oktaã«ç³è«ããã¾ã§ã«å¿ è¦ãªæè¡æ å ±ãæ±ãã¾ãã ä»å®è£ ãããã¨ãã¦ãããã®ããId管çã·ã¹ãã ã®Idä¾çµ¦å´(Id Provider)ã®å ´åãä»ã®æ å ±æºãå½ããããã«ãã¦ãã ããã
ç¨èªã«ã¤ãã¦
- SCIM: SCIMã¨ã¯"System for Cross-domain Identity Management" ã®ç¥ã§ãã·ã¹ãã éã§ã®ã¦ã¼ã¶ã¼ãçµç¹æ å ±ã®åæãè¡ãããã®ä»æ§ã§ã
- Identity Provider(IdP): ã¦ã¼ã¶ã¼ã»çµç¹æ å ±ãæä¾ããå´ã®ã·ã¹ãã ãæãã¾ã
- Serivce Provider(SP) : ã¦ã¼ã¶ã¼ã»çµç¹æ å ±ãå©ç¨ããå´ã®ã·ã¹ãã ãæãã¾ã
- Microsoft EntraID: Microsoft Azure Active Directoryï¼Azure ADï¼ã®æ°å称ãæãã¾ãããã®æç« ã§ã¯ Microsoft EntraIDã§çµ±ä¸ãã¦ãã¾ã
SCIMã£ã¦ï¼
SCIMã¯åºæ¬çãªhttp + JSONã¡ãã»ã¼ã¸ã®http APIã§æ§æããã¾ããæ¦å¿µå³ãä¸ã«ç¤ºãã¾ãã
1. åæãããã¸ã§ãã³ã°
IdP/SPéã§ã¦ã¼ã¶ã¼ã®åå¨ç¢ºèªãè¡ãã¾ã
GET /Users
ãªã¯ã¨ã¹ã : SPã®ã¦ã¼ã¶ã¼ããã¹ã¦åå¾ãã¾ãPOST /User
ãªã¯ã¨ã¹ã : SPã«åå¨ããªãã¦ã¼ã¶ã¼ãä½æãã¾ã
2. IdPã§å¤æ´ãããã¦ã¼ã¶ã¼æ å ±ãSPã¸å·®åé©ç¨ãã
GET /User/{id}
ãªã¯ã¨ã¹ã : IdP/SPéã§é£æºç¨ã®IDã使ã£ã¦ã¦ã¼ã¶ã¼ã®åå¨ã確èªãã¾ãPUT /User/{id}
ãªã¯ã¨ã¹ã : IdPã§è¡ãããã¦ã¼ã¶ã¼æ å ±ã®å¤æ´ãSPã«é©ç¨ãã¾ã
3. IdPã§ä½æãããã¦ã¼ã¶ã¼ãSPã«ãä½æãã
GET /Users?filter=
ãªã¯ã¨ã¹ã : IdPã§ä½æãããã¦ã¼ã¶ã¼ãSPã«åå¨ããã確èªãã¾ãPOST /User
ãªã¯ã¨ã¹ã : IdPã§ä½æãããã¦ã¼ã¶ã¼ãSPã«ä½æãã¾ã
é£æºç®æ¨ã®ã·ã¹ãã ã決ãã
åè¿°ã®ã¨ããè¶ å¤§æã®ID管çã¯ã©ã¦ãã·ã¹ãã ã¯é£æºã®ã£ã©ãªã¼ãå ¬éãã¦ãããSCIMãå®è£ ãããã¨ã«ãªã£ããã®ã£ã©ãªã¼ç»é²ãç®æ¨ã«ããã¨è¯ãããã§ãã
Microsoft Entra ID, Okta以å¤ã«ããããã¸ã§ãã³ã°æ©è½ãæã£ã¦ãããµã¼ãã¹ã¯åå¨ãã¾ãã
- Microsoft Entra ID
- Okta
- OneLogin
- Google workspace
- Ping Identity
ã®ã£ã©ãªã¼ãéçºæ¯æ´ãã¼ã«ã®å å®åº¦ãåèã«ã§ããããã¥ã¡ã³ãéããMicrosoft Entra ID,Oktaãcybozu.comã§ã¯é£æºç®æ¨ã«å®ãã¾ããã
ä»æ§ãæ¦è¦³ãã
ç®æ¨ã¨ãªãé£æºå ã決ããããä»æ§ããã£ããç解ãã¦ããã¾ããããããããã¥ã¡ã³ããå ¬éãã¦ããã¦ãã¾ãã®ã§ãã¡ããèªãã§ãã£ããç解ãã¾ãã
- Okta What is SCIM for?
- Okta and SCIM Version 2.0
- Azure Active Directory ã§ã®ã¢ããªã±ã¼ã·ã§ã³ã®ãããã¸ã§ãã³ã°ã®ããã¿
- ãã¥ã¼ããªã¢ã«: Azure Active Directory ã® SCIM ã¨ã³ããã¤ã³ãã®ãããã¸ã§ãã³ã°ãéçºããã³è¨ç»ãã
ãã£ããç解ã§ãããå¿ è¦ã«å¿ãã¦RFCãèªã¿è¾¼ãã§ããã¨ããã§ãããã次ã«ã¾ã¨ã¾ã£ã¦ãã¾ããSystem for Cross-domain Identity Management
詳細ãªhttpãªã¯ã¨ã¹ããã¬ã¹ãã³ã¹ããã£ã®è©³ç´°ã¯ãä¸è¨ããã¥ã¡ã³ãã«ããæ¸ããã¦ããã®ã§å²æãã¾ãã
èªè¨¼æ¹æ³ã決ãã
Id管çã·ã¹ãã ããéçºãã¦ããWebã·ã¹ãã ã®èªè¨¼æ¹æ³ã決ãã¾ãã以ä¸ï¼ç¹ãããæ¹éã決ããã¨ããã§ãããã
- Id管çã·ã¹ãã ããå©ç¨å¯è½ãªèªè¨¼æ¹å¼
- éçºä¸ã®Webã·ã¹ãã ã®ã¢ã¼ããã¯ãã£ã§å®è£ å¯è½
- ã§ããéãã»ãã¥ã¢
Id管çã·ã¹ãã ã«ãã£ã¦ããã¤ãã®èªè¨¼æ¹å¼ãæä¾ããã¦ãã¾ããä¾ã¨ãªãèªè¨¼æ¹å¼ã次ã«ç¤ºãã¾ãã
- OAuth2.0ãããã³ã«
- httpãããã¼ + ã·ã¼ã¯ã¬ãããã¼ã¯ã³
- ãã¼ã·ãã¯èªè¨¼
OAuth2.0ã®ãããã³ã«ã«æ²¿ã£ã¦ã§å®è£ ãããã£ãã®ã§ãããå¼ç¤¾ã®ã¢ã¼ããã¯ãã£ã§ã¯å®è£ ãå°é£ã§ããã ãã®ãããhttpãããã¼ï¼ã·ã¼ã¯ã¬ãããã¼ã¯ã³ã«ããèªè¨¼ãæ¡ç¨ãå®è£ ãã¾ããã
å®è£ ããç¯å²ã決ãã
å®è£ ããç¯å²ã決ãã¾ããã¦ã¼ã¶ã¼ã ãã§ãªãã°ã«ã¼ãã®ãããã¸ã§ãã³ã°ãä»æ§ã¨ãã¦ã¯åå¨ãã¦ãã¾ãã é©å®ãå·¥æ°ãéçºã·ã¹ãã ã¨ç¸è«ã®ä¸ãå®è£ ç¯å²ã決ãã¾ãããã
ã¦ã¼ã¶ã¼ã®ãããã¸ã§ãã³ã°æ©è½ãåä½ãããããã«å®è£ ããã¨ã³ããã¤ã³ãã次ã«ç¤ºãã¾ãã
POST /Users
(æ°è¦ã¦ã¼ã¶ã¼ã®ä½æ)GET /Users
(å ¨ã¦ã¼ã¶ã¼ã®åå¾)GET /Users?filter=...
(çµãè¾¼ã¿ã使ã£ãè¤æ°ã¦ã¼ã¶ã¼ã®åå¾)GET /Users/{id}
(ã¦ã¼ã¶ã¼ã®åå¾)PUT /Users/{id}
(ã¦ã¼ã¶ã¼ã®æ´æ°)PATCH /Users/{id}
(ã¦ã¼ã¶ã¼ã®æ´æ°)DELETE /Users/{id}
(ã¦ã¼ã¶ã¼ã®åé¤)GET /Schemas
(ã¹ãã¼ãæ å ±ã®åå¾)
é£æºããId管çã·ã¹ãã ã«ãã£ã¦ã¯ä¸è¨ã®APIã®ä¸ã«ä¸è¦ãªãã®ãããã¾ããè¦ä»¶ã®ç¶æ³ã«å¿ãã¦å®è£ ããAPIã決ããã¨ããã§ãããã
ã¹ãã¼ãè¨è¨ããã
Microsoft Entra ID ã¨cybozuã®ã¦ã¼ã¶ã¼ã®ãããã³ã°ã次ã«ç¤ºãã¾ãã
Microsoft Entra ID ã¦ã¼ã¶ã¼ | SCIMã¦ã¼ã¶ã¼ã¹ãã¼ã | cybozuã¦ã¼ã¶ã¼ |
---|---|---|
IsSoftDeleted | active | 使ç¨ç¶æ |
displayName | displayName | 表示å |
surname | name.familyName | å§ |
givenName | name.givenNameã | å |
emails[type eq "work"].value | Emailã¢ãã¬ã¹ | |
user-PrincipalName | externalId | SCIM æ¡å¼µã¦ã¼ã¶ã¼é ç®ã¨ãã¦æ°è¦ã«ç¨æ |
mailNickName/onpremisessamaccountname/user-PrincipalName | userName | ãã°ã¤ã³å |
ãªã | id | SCIM æ¡å¼µã¦ã¼ã¶ã¼é ç®ã¨ãã¦æ°è¦ã«ç¨æ |
ãªã | meta.created |
ä½ææ¥æ |
ãªã | meta.lastModified |
æ´æ°æ¥æ |
è¨å®é ç®æªå® | password | ãã¹ã¯ã¼ã |
SCIMã®ä»æ§ã§ã¯ã»ãã«ãããããå±æ§ãããã¾ããéçºããã·ã¹ãã ã«åããã¦æ±ºããã¨ããã§ãããã
å®è£ ãã
Id管çã·ã¹ãã ã«ãã£ã¦æãããªã¯ã¨ã¹ãã«ç¹å¾´ãããã¾ãããã®ãã注æãå¿ è¦ã§ãã 次ã®ä¾ã¯åãPATCHãªã¯ã¨ã¹ãã§ããå社ã§å¾®å¦ã«æ§é ä½ãç°ãªãã¾ããæ°æã¡ãå¼·ãæã£ã¦å®è£ ãããã¨ãå¿ è¦ã§ãã
{ "schemas": [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ], "Operations": [ { "op": "replace", "value": { "emails[type eq \"work\"].value": "[email protected]" } } ] }
{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [ { "op": "replace", "value": { "emails": [ { "value": "[email protected]", "type": "work" } ] } } ] }
è¤æ°ç¤¾ã®Id管çã·ã¹ãã ã対å¿ããã¨å ±éä»æ§ã¨ã¯åã°ããã§ã¯ãªããã¨å«ã³ãããªãæ°æã¡ã«ãªãã¾ãã ãã®æ°æã¡ãæããªããå®è£ ããããã¨ã大åã§ããé説çã§ã¯ããã¾ããPATCHå¨ãã®ç´°ãã話ã§ã¤ã¾ã¥ãã¨å®æã¯è¿ãã®ã§ãããã°ãã¾ãããã
ããå¤ãAzure ADã¨ã®é£æºãæ³å®ããã¨ãã«ã¯ä»¥ä¸ã«ç®ãéãã¦ããã¾ããããå¥éãç¥ãã¾ãã
試é¨ããã»ã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã
èªå試é¨ãã¼ã«ãæä¾ããã¦ãã¾ããå®éã®ID管çã·ã¹ãã ã¨ã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã¦åä½ç¢ºèªããåã«å©ç¨ã§ãã¾ãã é£æºæ³å®ã®Id管çã·ã¹ãã ã¨çµåããåã«èªå試é¨ãã¼ã«ã§åä½ç¢ºèªãã¦ãããæ¹ãè³¢æã§ãããã
ãã¼ã«ã«ã®éçºç°å¢ã§è©¦é¨ããå ´åã¯ngrok ã便å©ã§ããã»ãã¥ãªãã£è¦ç´ã§ç¤¾å ãã¼ã«ã¨ãã¦å©ç¨å¯è½ãªãã¼ã«ã確èªããããã«ãã¦ãã ããã
ã®ã£ã©ãªã¼ãå ¬éãã¦ããä¼æ¥ã«ç³è«ãã
ã®ã£ã©ãªã¼ã¸ã®ç»é²ãç³è«ãã¦ä½æ¥ãé²ãã¦ããã¾ãããã
- Okta > Publish an OIN integration
- Azure Active Directory ã¢ããªã±ã¼ã·ã§ã³ ã®ã£ã©ãªã¼ã§ã®ã¢ããªã±ã¼ã·ã§ã³ã®å ¬éã®è¦æ±ãéä¿¡ãã
ãããããä¸çªå¤§å¤ã§ãæéããããã¾ãã (社å ã§ååãã¦ãããçæ§ããããã¨ã)
å·ç : @yokotaso