# Authorization with different ledgers

**URL:** <https://forum.canton.network/t/authorization-with-different-ledgers/151>\
**Category:** App Development\
**Created:** [April 16, 2020, 8:11am UTC](https://forum.canton.network/t/authorization-with-different-ledgers/151 "2020-04-16T08:11:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![georg](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/georg/32/368_2.png) [@georg](https://forum.canton.network/u/georg)\
**Post date:** [April 16, 2020, 8:11am UTC](https://forum.canton.network/t/authorization-with-different-ledgers/151/1 "2020-04-16T08:11:35Z")

</div>

Reading the documentation I want to confirm my understanding:

1. The claims (`public`, `admin`, `canReadAs`, `canActAs`) are generic concepts that are defined in the interface between an AuthService and the Ledger API Server. All ledger implementations have to support these, but the format / encoding can vary.
2. The Ledger API Server does not contain logic to interpret a token, but will pass it through to the AuthService to confirm the claims required for the action to be taken. So the format / encoding required for a particular ledger is defined by the AuthService implementation.
3. The way a token is passed to the API is defined by the Ledger API Server (via gRPC), respectively the HTTP JSON API (via `Authorization` header). So this is again common to all ledger implementations.

My questions:

- Is the above understanding correct?
- The DAML-on-SQL implementation uses JWT token encoding. What other token encodings are common?
- Where can I find information about the token format / encoding for other ledger implementations, like DAML-on-Sawtooth or DAML-on-Fabric?

---

<div class="post-metadata">

**Author:** ![bernhard](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bernhard/32/356_2.png) [@bernhard](https://forum.canton.network/u/bernhard)\
**Post date:** [April 16, 2020, 12:09pm UTC](https://forum.canton.network/t/authorization-with-different-ledgers/151/2 "2020-04-16T12:09:22Z")

</div>

Your understanding is sort of correct. The Auth Service is a Java API, which defines [possible claims](https://github.com/digital-asset/daml/blob/master/ledger/ledger-api-auth/src/main/scala/com/digitalasset/ledger/api/auth/Claims.scala#L82). The Sandbox JWT format is fairly faithful to that, but there are claims not currently exposed like the wildcard `CanActAsAnyParty`.

What you say in 2. and 3. is correct.

I don’t know any other 1-1 alternatives to JWT, but you can, of course, pass anything in the `Authorization` header. I don’t think it would be difficult to write an AuthService which implements [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).

Since authentication is participant specific, information about the authentication token format has to be provided by ledger operators. The OSS DAML-on-Sawtooth and DAML-on-Fabric ledgers use a wildcard AuthService, which allows all requests as far as I know.
