MissingPermissionException: Unable to find Permission named [Model Update]

Hello everyone,
For starters: I’m new to A12, but:
I’m trying to insert authorization into a project, but just adding the authorizationDefinition.json file and defining any policy/permission causes an error:

In the roles assigned to the username I have added the right MODEL_UPDATE

Does anyone have any ideas?

Hi,
For the UAA configuration of authorization definition we have two properties to use:

  • mgmtp.a12.uaa.authorization.authorizationDefinition=classpath:/uaa/authorizationDefinition.json this property normally uses definition that UAA provides by default. This file has the “Model Update” permission.
  • mgmtp.a12.uaa.authorization.child-authorization-definitions for your additional policy/permission resource. We recommend adding your authorizationDefinition.json file here.

For more details: GetA12 Login

Hope this helps.

hmmm :thinking:

Your setup should be:
mgmtp.a12.uaa.authorization.authorizationDefinition=classpath:/uaa/authorizationDefinition.json mgmtp.a12.uaa.authorization.child-authorization-definitions=<your classpath to the file>

This property: mgmtp.a12.uaa.authorization.authorizationDefinition is mandatory. uaa/authorizationDefinition.json is a resource provided by DataServices which contains standard permissions/policies for running application. You want more logic with your authorization definition resource, please add this property:
mgmtp.a12.uaa.authorization.child-authorization-definitions=<your classpath to the file>. This property is optional.

If you have any concerns, please contact me via Webex.

Hi,
If you are using the dataservices-uaa profile, the required authorizationDefinition is automatically provided by DS with the following property:
mgmtp.a12.uaa.authorization.authorizationDefinition=classpath:/uaa/authorizationDefinition.json
The default authorizationDefinition.json file contains all the necessary policies and permissions for running DS.

However, I noticed that you are adding your own authorization definition file with the same name and path. This will override the default authorizationDefinition.json. If your custom file doesn’t include all the required policies and permissions, it can cause errors when starting the app.

I recommend renaming your custom authorization definition file to something like childAuthorizationDefinition.json. Then, you can set this additional authorization definition using the following property:
mgmtp.a12.uaa.authorization.child-authorization-definitions=classpath:/uaa/childAuthorizationDefinition.json

Hi @wojciech-azure-mesa,
has your question been answered or do you need further support? If it is solved, please, use the checkbox to mark the solution to your problem so that other users also know what helped in your case.
Thanks in advance!
Denise from the Discourse team