# Keycloak operator: create client with authorization resource and policy

**URL:** <https://forum.keycloak.org/t/keycloak-operator-create-client-with-authorization-resource-and-policy/8102>\
**Category:** Getting advice\
**Tags:** authentication, oidc\
**Created:** [March 23, 2021, 12:48pm UTC](https://forum.keycloak.org/t/keycloak-operator-create-client-with-authorization-resource-and-policy/8102 "2021-03-23T12:48:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SimoneDiCola](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@SimoneDiCola](https://forum.keycloak.org/u/SimoneDiCola)\
**Post date:** [March 23, 2021, 12:48pm UTC](https://forum.keycloak.org/t/keycloak-operator-create-client-with-authorization-resource-and-policy/8102/1 "2021-03-23T12:48:55Z")

</div>

Hi all,  
looking at the client CRD specification ([keycloak-operator/keycloak.org\_keycloakclients\_crd.yaml at master · keycloak/keycloak-operator · GitHub](https://github.com/keycloak/keycloak-operator/blob/master/deploy/crds/keycloak.org_keycloakclients_crd.yaml)) I do not see a way to enable authorisation and set resources and policies based on roles.  
At the moment, I am only able to do it manually, but I wonder if there is a way to create it programmatically.

---

<div class="post-metadata">

**Author:** ![SimoneDiCola](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@SimoneDiCola](https://forum.keycloak.org/u/SimoneDiCola)\
**Post date:** [March 24, 2021, 1:41pm UTC](https://forum.keycloak.org/t/keycloak-operator-create-client-with-authorization-resource-and-policy/8102/2 "2021-03-24T13:41:11Z")

</div>

I am quite sure this can be achieved programmatically using an admin client, but I would rather use the k8n style to add resources.
