crossplane-contrib / provider-keycloak

Apache License 2.0
22 stars 14 forks source link

How to refer Subflow within Execution #163

Open tanalam2411 opened 3 weeks ago

tanalam2411 commented 3 weeks ago

In Execution spec there are options available to refer Parent Flow.

apiVersion: authenticationflow.keycloak.crossplane.io/v1alpha1
kind: Execution
metadata:
  annotations:
    meta.upbound.io/example-id: authenticationflow/v1alpha1/execution
  labels:
    testing.upbound.io/example-name: execution_one
  name: execution-one
spec:
  forProvider:
    authenticator: auth-cookie
    parentFlowAliasSelector:
      matchLabels:
        testing.upbound.io/example-name: flow
    realmIdSelector:
      matchLabels:
        testing.upbound.io/example-name: realm
    requirement: ALTERNATIVE

Similar to this, how can we refer Parent SubFlow, as I want to add step within Subflow in KeyCloak authentication.

Breee commented 1 week ago

can you make a full example of what you are trying to do / need?

tanalam2411 commented 1 week ago

image

I have configured this flow and added 2 steps using Execution MR and one SubFlow using SubFlow MR using this Provider. But I want to add one step within SubFlow and for that I need to create MR of type Execution but it should resolve the reference to this SubFlow but I think it can only resolves for type Flow.

So, within parentFlowAliasSelector it should support resolvereference for both Flow and SubFlow.

apiVersion: authenticationflow.keycloak.crossplane.io/v1alpha1
kind: Execution
metadata:
  name: execution-one
spec:
  forProvider:
    authenticator: auth-cookie
    parentFlowAliasSelector:
      matchLabels:
        testing.upbound.io/example-name: flow
    realmIdSelector:
      matchLabels:
        testing.upbound.io/example-name: realm
    requirement: ALTERNATIVE

But if this is an incorrect assumption and there is some other way to add step within SubFlow then that would be helpful. In the above image, the last step Username Password Form is added manually and we need a way add that step within SubFlow using this provider.