アプリケーションの操作

この項のユースケースでは、AppRolesをアプリケーションに付与するステップと、OAuthアプリケーションを作成してアクティブ化するリクエストの例を示します。各ユースケースでは、必要なアプリケーション属性も示します。

この項の内容は次のとおりです:

アプリケーションへのアプリケーション・ロールの付与

次の例を使用して、アプリケーションにアプリケーション・ロールを付与するためのリクエストを作成します。

この例には次のステップが含まれます。

ステップ1: AppRoleの確認

割り当てるAppRoleを識別します。

GET HOST/admin/v1/AppRoles?filter=app.value eq "IDCSAppId"
{
  "displayName": "User Administrator",
  "id": "...",
  "uniqueName": "IDCSAppId_User Administrator",
  "app": {
    "name": "IDCSApp",
    "value": "IDCSAppId",
    "display": "IDCS Application",
    "$ref": "..."
  },
}

ステップ2: 詳細を取得します。

ターゲット・アプリケーションの詳細を取得します。

GET {{HOST}}/admin/v1/Apps?filter=displayName eq "target-appname"
{
   "displayName": "target-appname",
   "id": "...",
   "grantedAppRoles": [
      {
         "value": "...",
         "$ref": "...",
         "appId": "IDCSAppId",
         "display": "User Administrator",
         "type": "direct",
         "appName": "IDCSApp",
         "adminRole": true
      },
      {
         "value": "...",
         "$ref": "...",
         "appId": "IDCSAppId",
         "display": "Identity Domain Administrator",
         "type": "direct",
         "appName": "IDCSApp",
         "adminRole": true
      }
]

ステップ3: AppRoleの付与

AppRoleをアプリケーションに付与します。

POST {{HOST}}/admin/v1/Grants
{
    "grantee": {
        "type": "App",
        "value": "..." <------- "id" of the app/grantee that the AppRole will be assigned to.
    },
    "app": {
        "value": "IDCSAppId" <------- the AppId to be assigned to the App.
    },
    "entitlement" : {
        "attributeName": "appRoles",
        "attributeValue": "..." <---- the "id" of the AppRole e.g, IDA
    },
    "grantMechanism" : "ADMINISTRATOR_TO_APP",
    "schemas": ["urn:ietf:params:scim:schemas:oracle:idcs:Grant"]
}

ステップ4: 詳細を再度取得する

ターゲット・アプリケーションの詳細を再度取得します。

GET {{HOST}}/admin/v1/Apps?filter=displayName eq "target-appname"
{
   "displayName": "target-appname",
   "id": "...",
   "grantedAppRoles": [
      {
         "value": "...",
         "$ref": "...",
         "appId": "IDCSAppId",
         "display": "User Administrator",
         "type": "direct",
         "appName": "IDCSApp",
         "adminRole": true
      },
      {
         "value": "...",
         "$ref": "...",
         "appId": "IDCSAppId",
         "display": "Identity Domain Administrator",
         "type": "direct",
         "appName": "IDCSApp",
         "adminRole": true
      }
]