Giter VIP home page Giter VIP logo

Comments (3)

mrparkers avatar mrparkers commented on August 28, 2024

Thoughts on this:

  1. It looks like this resource could be shared between clients and client-scopes. Meaning, you could add a protocol mapper to a client so only that client uses this mapper, or you could add it to a scope so that any client using that scope will have this mapper. This means that the resource would need to use attributes such as client_id or client_scope_id in order to tie it to one or the other. It would probably be required to set one and only one of these attributes.
  2. There are some protocol mappers that can be used for both openid and saml clients/client-scopes (such as User Attribute), but the APIs are so drastically different between the two that it would probably make sense to split them out according to the protocol. This would mean that the protocol would be part of the name of the resource as opposed to an attribute on the resource.

With this in mind, perhaps the resource may look something like this?

resource "keycloak_openid_hardcoded_claim_protocol_mapper" "my-foo-claim" {
     client_id = "${keycloak_client.test-client.id}"
     name = "foo-claim"
     claim_name = "foo"
     claim_string_value = "bar" // mutually exclusive long_value, int_value, bool_value fields
     add_to_access_token = true
     add_to_id_token = false 
}

from terraform-provider-keycloak.

alexashley avatar alexashley commented on August 28, 2024
  1. Not that familiar with client scopes, but allowing for client and client scopes to share the resource seems like a good idea.
  2. If the APIs are that different between openid connect and saml, then I agree that it makes sense to split them out. I don't imagine there's a use case for changing one protocol to the other.

The config you posted looks good to me. I forgot to prefix the resource with keycloak and tie the resource to an actual client in my example.

from terraform-provider-keycloak.

alexashley avatar alexashley commented on August 28, 2024

I'm going to take a shot at implementing this.

from terraform-provider-keycloak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.