Giter VIP home page Giter VIP logo

Comments (6)

ostefano avatar ostefano commented on August 15, 2024 1

@pettai this is the correct format: OIDC_ROLES_MAPPING="{\"admin\": \"1\"}" (valid JSON and quotes escaped).
I will commit an updated description in the template, and close this.

from misp-docker.

ostefano avatar ostefano commented on August 15, 2024

You need to check MISP logs inside the logs directory (on the host).
Installing the library should not be required.

from misp-docker.

pettai avatar pettai commented on August 15, 2024

Hi,

I wonder if this is the issue:

\"role_mapper\": ${OIDC_ROLES_MAPPING},

I also have problems getting OIDC correctly configured into config.php, during docker compose up it says:

Provided new config is not array, NULL given.

I've tested the input as the configure_misp.sh script runs it (inside the misp docker itself):

root@5a3534a3b270:/var/www/MISP# sudo -u www-data php /var/www/MISP/tests/modify_config.php modify "{
            \"OidcAuth\": {
                \"provider_url\": \"https://OIDC-proxy\",
                \"client_id\": \"test_id\",
                \"client_secret\": \"testtesttesttest\",
                \"roles_property\": \"roles\",  
                \"role_mapper\": {"admin": "1","sync-user": "5"},
                \"default_org\": \"ORGNAME\"
            }
        }"

I also tested various escaping on the ${OIDC_ROLES_MAPPING} variable, but I never got the end result in config.php to look like described in https://github.com/MISP/MISP/blob/2.4/app/Plugin/OidcAuth/README.md

Perhaps the documentation / example needs to be revisited?
(above example is from

# OIDC_ROLES_MAPPING={"admin": "1","sync-user": "5"}
)

from misp-docker.

ostefano avatar ostefano commented on August 15, 2024

Good point.

from misp-docker.

pettai avatar pettai commented on August 15, 2024

adding OIDC_ROLES_MAPPING=[] generates a empty array() in config.php, so I suspect the formatting should look like that instead of OIDC_ROLES_MAPPING={}

from misp-docker.

ostefano avatar ostefano commented on August 15, 2024

@pettai not sure you are highlighting the actual issue: we are trying to convert json arrays into php associative arrays, so I don't see anything wrong with OIDC_ROLES_MAPPING={}.

Unfortunately I don't have time to work on this, but will happily review/merge PRs.

from misp-docker.

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.