-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Frodo CLI version
cli: v3.0.5
lib: v3.1.0
node: v20.18.0
Describe the issue
I am using frodo 3.0.5 to manage AM configuration for our on-premise, self managed platform deployment.
I have exported PolicySet along with dependencies using the set export --prereqs command. In the generated JSON file, I can see the resource type and the policies along with the policy set definition.
I then tried to import this into another environment using the set import --prereqs command. I was expecting it to import the resource type first, then the policy, policyset objects. But the command fails to run successfully saying that Resource type doesn't exists.
frodo authz set import -f Myapp-PolicySet.policyset.authz.json --prereqs -k pmid102 Workforce
Connected to .....
Importing first authorization policy set from file "Myapp-PolicySet.policyset.authz.json"...
× Error importing first policy set
Error importing first policy set
Error importing hard dependencies for policy set Myapp-PolicySet
HTTP client error
Code: ERR_BAD_REQUEST
Status: 404
Reason: Not Found
Message: Resource Type 963a8b26-6697-4063-a232-aa92262fda32 does not exist in realm /Workforce
HTTP client error
If I do not specify the --prereqs flag, then following error appears.
$ frodo authz set import -f Myapp-PolicySet.policyset.authz.json -k pmid102 Workforce --verbose
Using cached session token.
Connected to ...
Importing first authorization policy set from file "Myapp-PolicySet.policyset.authz.json"...
× Error importing first policy set
Error importing first policy set
HTTP client error
Code: ERR_BAD_REQUEST
Status: 400
Reason: Bad Request
Message: Invalid resource type 963a8b26-6697-4063-a232-aa92262fda32.
Interestingly enough, if I export just the ResourceType object and then import into the target environment, I am then able to import the full policyset object using the above command.
Is it not possible to import PolicySet and ResourceType at once? If yes, is there a bug or am I making any mistake?