Beispiel für OAM-Anwendungskonfiguration und Oracle GoldenGate-Autorisierungsprofil
Die folgenden Skripte sind Beispiele für die Konfiguration verschiedener Komponenten beim Erstellen einer sicheren Oracle Access Manager-(OAM-)Anwendung.
Identitätsdomains erstellen
Das folgende Beispiel zeigt die Erstellung einer Identitätsdomain in OAM.
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
}'
Ressourcenserver erstellen
Das folgende Beispiel zeigt das Erstellen eines Ressourcenservers für die OAM-Anwendung:
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"
}]
}'
Anwendung erstellen
Das folgende Beispiel zeigt, wie Sie eine Anwendung mit einigen Umleitungs-URIs mit OAM erstellen:
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"
}'
Autorisierungsprofil in Oracle GoldenGate für die OAM-Anwendung erstellen
Das folgende Code-Snippet ist ein Beispiel dafür, wie Sie ein Autorisierungsprofil in Oracle GoldenGate (mit cURL) für die OAM-Anwendung erstellen:
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