infobloxopen / seal

Apache License 2.0
16 stars 11 forks source link

support for backend for multi-tenants #11

Open daniel-garcia opened 4 years ago

daniel-garcia commented 4 years ago

Swagger petstore.jwt.swagger:

      properties:
...
        # tenant_ref is a non-standard claim
        tenant_ref:
          type: string
          example: "SD_ZOO"
          description: "tenant_ref claim provides the tenant reference for a petstore.  equivalent uses: account_id, org_id, ..."

SEAL context rule:

context {
    where subject.tenant_ref == "SD_ZOO";
} ... {
...
}
wplu commented 3 years ago

The above commit defines the field in the JWT to illustrate the use of multi tenants. That jwt field tenant_ref should be used in the implementation demo.