Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-1175

Support x-rh-identity for customer-facing APIs in swatch-contracts

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • BIZ-610 - ROSA-HCP

      In order to support customer APIs serviced by the swatch-contracts service, we need to implement auth & rbac for customers in quarkus.

      We should support a new role - "customer", which is granted to any x-rh-identity principal that has customer details (see IdentityHeaderAuthenticationDetailsService#loadUserDetails for an analogue in the monolith). Update RoleAugmentor to grant "customer" when the principal is a customer. Update the DTO for RhIdentityPrincipal to contain necessary fields (see InsightsUserPrincipal in the monolith).

      For testing, update the stubbed subscriptions metric endpoint in swatch-contracts to be limited to role "customer" via @RolesAllowed({"customer"}). Also update the monolith openapi spec to reflect via securityScheme that the contracts endpoint requires auth. (Add 3scaleIdentity to security scheme for the endpoint).

            khowell@redhat.com Kevin Howell
            khowell@redhat.com Kevin Howell
            Aurobinda Nayak Aurobinda Nayak
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: