Skip to content
CCPEDIAby Unity Nodes
App Development

Access Token configuration for Canton console

3 posts436 views3 likesLast activity Mar 2022

  1. kctamOP

    Hi team,

    I have enabled the authorization on the ledger API of a canton setup. When I use canton console (with remote configuration) access the setup, I got unauthenticated error when performing dars.upload and ledger_api commands. I think I need to provide the access token in order to perform these commands.

    My question is, where can I specify the access token file in the (remote) configuration file?

    Thanks.
    kc

  2. Phoebe_Nichols 2

    Hi KC,

    You can set a token in the config for a remote participant.

    For example:

    canton {
      remote-participants {
        remoteParticipant1 {
          admin-api {
            port = 10012
            address = 127.0.0.1 // is the default value if omitted
          }
          ledger-api {
            port = 10011
            address = 127.0.0.1 // is the default value if omitted
          }
          token = FAKETOKEN
        }
      }
    }
    
    

    You can read more in our scaladoc documentation here: https://www.canton.io/docs/dev/scaladoc/com/digitalasset/canton/participant/config/RemoteParticipantConfig.html#token:Option[String]

    Let me know if that doesn’t work.

    Phoebe

  3. kctam 1

    Thanks @Phoebe_Nichols This works! Thanks.

    kc