OAM 애플리케이션 구성 및 Oracle GoldenGate 권한 부여 프로파일의 예

다음 스크립트는 보안 OAM(Oracle Access Manager) 응용 프로그램을 만들 때 다양한 구성 요소를 구성하는 예입니다.

ID 도메인을 생성합니다.

다음 예에서는 OAM에서 ID 도메인 만들기를 보여줍니다.

curl -x ""
     -u 'weblogic:weblogic1'
       'http://east.oraclevcn.com:18585/oam/services/rest/ssa/api/v1/oauthpolicyadmin/oauthidentitydomain'
     -H 'Content-Type: application/json'
     -d '
        {"name": "OGGDomain1"
        ,"identityProvider": "OUD"
        ,"description": "Test Domain"
        , "tokenSettings":
           [{"tokenType": "ACCESS_TOKEN"
	  ,"tokenExpiry": 3600
	  ,"lifeCycleEnabled": false
	  ,"refreshTokenEnabled": false
	  ,"refreshTokenExpiry": 86400
	  ,"refreshTokenLifeCycleEnabled": false
            }
	 ,{"tokenType": "AUTHZ_CODE"
	  ,"tokenExpiry": 3600
	  ,"lifeCycleEnabled":false
	  ,"refreshTokenEnabled": false
	  ,"refreshTokenExpiry": 86400
	  ,"refreshTokenLifeCycleEnabled": false
	  }
	 ,{"tokenType": "SSO_LINK_TOKEN"
	  ,"tokenExpiry": 3600
	  ,"lifeCycleEnabled": false
	  ,"refreshTokenEnabled": false
	  ,"refreshTokenExpiry":86400
	  ,"refreshTokenLifeCycleEnabled": false
	  }
	 ]
       ,"errorPageURL": " http://east.oraclevcn.com:2222/oam/pages/servererror.jsp"
       ,"consentPageURL":"http://east.oraclevcn.com:2222/oam/pages/consent.jsp"
       ,"customAttrs": null
       }'

리소스 서버 생성

다음 예에서는 OAM 응용 프로그램에 대한 리소스 서버를 만드는 방법을 보여줍니다.

curl -x ""
     -u weblogic:weblogic1
     -H "Content-Type: application/json" '
	http://east.oraclevcn.com:18585/oam/services/rest/ssa/api/v1/oauthpolicyadmin/application'
     -X POST
     -d '
        {"idDomain":"OGGDomain1"
        ,"name":"OGGResourceServerCorrect"
        ,"scopes":
        [{"scopeName":"oggServiceToService"
         ,"description":"test ogg urn scope"
        }]
        }'

응용 프로그램 생성

다음 예에서는 OAM을 사용하여 일부 재지정 URI가 있는 응용 프로그램을 만드는 방법을 보여줍니다.

curl -x ""
     -v
     -u weblogic:<weblogicpwd>
     -H "Content-Type: application/json"
       'http://east.oraclevcn.com:18585/oam/services/rest/ssa/api/v1/oauthpolicyadmin/client'
     -X POST
     -d '
        {"secret":"OGGClient1Secret"
        ,"id":"OGGClientID1"
        ,"scopes":["OGGResourceServerCorrect.oggServiceToService"]
        ,"clientType":"CONFIDENTIAL_CLIENT"
        ,"idDomain":"OGGDomain1"
        ,"description":"Client Description"
        ,"name":"OGGClientCorrect"
        ,"grantTypes":["PASSWORD", "CLIENT_CREDENTIALS", "AUTHORIZATION_CODE"]
        ,"defaultScope":"OGGResourceServerCorrect.oggServiceToService"
        ,"redirectURIs":
          [{"url":"https://localhost:9010/services/v2/authorization", "isHttps":true}
          ,{"url":"https://west.oraclevcn.com:9010/services/v2/authorization", "isHttps":true}
          ,{"url":"https://west.oraclevcn.com:9001/services/v2/authorization", "isHttps":true}
          ,{"url":"https://localhost:9001/services/v2/authorization", "isHttps":true}
          ]
         ,"attributes":[{"attrName":"OGGGroups"
         ,"attrValue":"${user.groups}"
         ,"attrType":"STATIC"
         }'

OAM 애플리케이션에 대한 Oracle GoldenGate에서 권한 부여 프로파일 생성

다음 코드 조각은 OAM 응용 프로그램에 대해 Oracle GoldenGate(cURL 사용)에서 권한 부여 프로파일을 생성하는 방법의 샘플입니다.

curl -k
     -u ggma:<ggmapwd>
     -X POST
     -d '{"type":"oam"
         ,"clientID":"OGGClientID1"
         ,"clientSecret":"OGGClient1Secret"
         ,"tenantDiscoveryURI":"http://east.oraclevcn.com:2222/.well-known/openid-configuration"
         ,"groupToRoles":{"securityGroup":"fusionapps_gg_prod_sec"
                         ,"administratorGroup":"fusionapps_gg_prod_admin"
                         }
         ,"identityDomain":"OGGDomain1"
         }'
         https://localhost:9010/services/v2/deployments/ServiceManager/authorization/profiles/smProfile