Hi,
Referring to a previous ask (link), I have tested to run script with authorization.
- run allocateParties with participant_admin jwt
- run initialize with superuser jwt (superuser can act as alice and bob)
In 2, when I used this command
daml script --dar .daml/dist/project-0.0.1.dar --script-name Main:initialize --input-file ledger-parties.json --ledger-host localhost --ledger-port 6865 --access-token-file superuserjwt
It fails with the message in the sandbox
WARN c.d.l.a.a.Authorizer - PERMISSION_DENIED(7,0): Claims are only valid for applicationId 'superuser', actual applicationId is 'daml-script', context: {participant: "sandbox", err-context: "{location=ErrorFactories.scala:238}"}
Then I add --application-id superuser
in this command
daml script --dar .daml/dist/project-0.0.1.dar --script-name Main:initialize --input-file ledger-parties.json --ledger-host localhost --ledger-port 6865 --access-token-file superuserjwt --application-id superuser
It works well.
Kindly advice if it is related to a previous ask, about using --application-id
for userid in this case.
Thanks in advance.
kc