SecureApiGateway / SecureApiGateway

Top level project - includes wiki, github-pages and issues
https://github.com/SecureApiGateway/SecureApiGateway/wiki
Apache License 2.0
1 stars 1 forks source link

AM Identity end-user-ui of type agentonly already exists #530

Open dbadham-fr opened 1 year ago

dbadham-fr commented 1 year ago

In the AM logs the following message is regularly being logged:

{"timestamp":"2022-09-26T09:37:20.434Z","level":"WARN","thread":"http-nio-8081-exec-1","mdc":{"transactionId":"0266144d-d246-48c9-846e-2d38b8fb0d6d-115695"},"logger":"com.sun.identity.idm.server.IdServicesImpl","message":"Unable to perform operation for the repository com.sun.identity.idm.server.AttributeMappingIdRepo :: Identity end-user-ui of type agentonly already exists.","context":"default"}

This message is followed by an exception with a very large stacktrace, here is a snippet:

{"timestamp":"2022-09-26T09:37:20.435Z","level":"WARN","thread":"http-nio-8081-exec-1","mdc":{"transactionId":"0266144d-d246-48c9-846e-2d38b8fb0d6d-115695"},"logger":"org.forgerock.openam.errors.AgentResourceExceptionMappingHandler","message":"::SmsAgentsGroupsResource:: IdRepoException IDENTITY_OF_TYPE_ALREADY_EXISTS on access","context":"default","exception":"com.sun.identity.idm.IdRepoDuplicateObjectException: Identity end-user-ui of type agentonly already exists.\n\tat com.sun.identity.idm.IdRepoDuplicateObjectException.identityOfTypeAlreadyExists(IdRepoDuplicateObjectException.java:65)\n\tat com.sun.identity.idm.plugins.internal.AgentsRepo.create(AgentsRepo.java:259)\n\tat com.sun.identity.idm.server.IdRepoDecorator.create(IdRepoDecorator.java:111)\n\
dbadham-fr commented 1 year ago

Additional logs for the same scenario but with a different transactionId...

It appears to be being triggered by the initializer

{"timestamp":"2022-09-26T12:17:22.109Z","eventName":"AM-ACCESS-OUTCOME","transactionId":"0266144d-d246-48c9-846e-2d38b8fb0d6d-161261","trackingIds":["0266144d-d246-48c9-846e-2d38b8fb0d6d-161029"],"userId":"id=amadmin,ou=user,ou=am-config","client":{"ip":"10.20.5.24","port":36968},"server":{"ip":"10.20.0.7","port":8081},"http":{"request":{"secure":true,"method":"PUT","path":"htt
ps://iam.dev.forgerock.financial/am/json/alpha/realm-config/agents/OAuth2Client/end-user-ui","headers":{"accept":["application/json"],"accept-api-version":["protocol=2.1"],"content-type":["application/json"],"host":["iam.dev.forgerock.financial"],"user-agent":["go-resty/2.4.0 (https://github.com/go-resty/resty)"],"x-forwarded-for":["10.20.1.146"],"x-forwarded-host":["iam.dev.fo
rgerock.financial"],"x-forwarded-port":["443"],"x-forwarded-proto":["https"],"x-real-ip":["10.20.1.146"],"x-requested-with":["ForgeRock Identity Cloud Postman Collection"],"x-scheme":["https"]}}},"request":{"protocol":"CREST","operation":"CREATE"},"response":{"status":"FAILED","statusCode":"412","elapsedTime":4,"elapsedTimeUnits":"MILLISECONDS","detail":{"reason":"Unable to acc
ess SMS config: Identity end-user-ui of type agentonly already exists."}},"realm":"/alpha","component":"Config","source":"audit","topic":"access","level":"INFO","_eventId":"0266144d-d246-48c9-846e-2d38b8fb0d6d-161265"}
BohoCode commented 9 months ago

Needs investigation

BohoCode commented 9 months ago

Hey team! Please add your planning poker estimate with Zenhub @dbadham-fr @jorgesanchezperez