Giter Club home page Giter Club logo

Comments (7)

yaleman avatar yaleman commented on June 14, 2024 2

ok, that's what I was going for, confirmation of how it was done so we can try and replicate/trace it 😄

from kanidm.

yaleman avatar yaleman commented on June 14, 2024

Can you please show us how it was configured on the command line?

I'm guessing you specified "some_value,another_value" which likely got caught as a single entry.

from kanidm.

playhardgopro avatar playhardgopro commented on June 14, 2024

I have ran these:

kanidm system oauth2 update-claim-map-join frontend-test-public claim_42 array >/dev/null
kanidm system oauth2 get frontend-test-public | grep claim_42
kanidm system oauth2 update-claim-map-join frontend-test-public claim_42 ssv >/dev/null
kanidm system oauth2 get frontend-test-public | grep claim_42
kanidm system oauth2 update-claim-map-join frontend-test-public claim_42 csv >/dev/null
kanidm system oauth2 get frontend-test-public | grep claim_42

And have received:

oauth2_rs_claim_map: claim_42:[email protected]:;:"another_value,some_value,value_3,value_4,value_5"
oauth2_rs_claim_map: claim_42:[email protected]: :"another_value,some_value,value_3,value_4,value_5"
oauth2_rs_claim_map: claim_42:[email protected]:,:"another_value,some_value,value_3,value_4,value_5"

I expected to receive something like these

oauth2_rs_claim_map: claim_42:[email protected]:;:"another_value;some_value;value_3;value_4;value_5"
oauth2_rs_claim_map: claim_42:[email protected]: :"another_value some_value value_3 value_4 value_5"
oauth2_rs_claim_map: claim_42:[email protected]:,:"another_value,some_value,value_3,value_4,value_5"

I am not sure about the case with array (;) :)

from kanidm.

playhardgopro avatar playhardgopro commented on June 14, 2024

Perhaps, the problem is somewhere here
but I don't know Rust at all and can't help you with this code :(

from kanidm.

yaleman avatar yaleman commented on June 14, 2024

Ok you haven't specified how you set the values you expect to be joined. That's the thing I was trying to highlight.

from kanidm.

playhardgopro avatar playhardgopro commented on June 14, 2024

Sorry, I don't have an access to our Kanidm instance :(
I can only provide you the curl request which I send to add values

curl 'https://idm.example.com/v1/oauth2/frontend-test-public/_claimmap/claim_42/test' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer add_your_token' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: https://idm.example.com' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  --data-raw '["some_value","value_1","value_2"]'

I will try to provide you more details after getting the access to our Kanidm CLI

UPD:

kanidm system oauth2 update-claim-map frontend-test-public claim_43 idm_admins a b c # created
# oauth2_rs_claim_map: claim_43:[email protected]:;:"a,b,c"
kanidm system oauth2 update-claim-map-join frontend-test-public claim_43 csv # changed
# oauth2_rs_claim_map: claim_43:[email protected]:,:"a,b,c"

from kanidm.

Firstyear avatar Firstyear commented on June 14, 2024

I think the confusion is how we display the joiner on the cli. When we "get" the entry, we always display them as a csv. This is because of something you noted yourself.

I am not sure about the case with array (;) :)

Simply, displaying the array became tricky to work out how to do nicely.

So we display it as :<joiner>:<csv of values>.

But I will assure you, that the content in what we sent to the oauth2 client is formatted as you would expect. :)

from kanidm.

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.