Git Product home page Git Product logo

Comments (7)

satterly avatar satterly commented on September 25, 2024

The redirect URL used by Alerta comes from the OIDC provider. In your case keycloak. Unless I'm missing something I believe the keycloak setting needs to be changed to fix your problem.

from alerta.

CorentinH45 avatar CorentinH45 commented on September 25, 2024

Hello,

Thanks for your feedback.

I'm not sure I understand. It's the conf files ported by Alerta that allow to interconnect with products like Keycloak. So it is up to Alerta to update itself to follow the evolutions of the products.

The modification must be done in the different files of Alerta (oidc.py, probably files in the web conf for the login window).

from alerta.

satterly avatar satterly commented on September 25, 2024

Alerta config for Keycloak version < 17 ...

        'AUTH_PROVIDER': 'keycloak',
        'KEYCLOAK_URL': 'http://keycloak.local.alerta.io:9090/auth',
        'KEYCLOAK_REALM': 'master',

Alerta config for Keycloak version >= 17 ...

        'AUTH_PROVIDER': 'keycloak',
        'KEYCLOAK_URL': 'http://keycloak.local.alerta.io:9090',
        'KEYCLOAK_REALM': 'master',

Or using the generic OIDC config options...

Alerta config for Keycloak version < 17 ...

        'AUTH_PROVIDER': 'openid',
        'OIDC_ISSUER_URL': 'http://keycloak.local.alerta.io:9090/auth/realms/master',

Alerta config for Keycloak version >= 17 ...

        'AUTH_PROVIDER': 'openid',
        'OIDC_ISSUER_URL': 'http://keycloak.local.alerta.io:9090/realms/master',

from alerta.

CorentinH45 avatar CorentinH45 commented on September 25, 2024

Hello,
I agree with your answer. But even if I manage to start the service by modifying the oidc.py file, I still have the problem of the uri redirection when I try to connect to Alerta.

I did some research with a developer at my company, and it looks like there are things to modify in the /var/www ... but it also looks like it's coming from the compiled code.

At this level, there is nothing we can do ...

from alerta.

satterly avatar satterly commented on September 25, 2024

I agree with your answer.

Did you try making only the configuration changes I have suggested above? Did it work? Did anything work differently?

But even if I manage to start the service by modifying the oidc.py file, I still have the problem of the uri redirection when I try to connect to Alerta.

What changes did you need to make to oidc.py?

I did some research with a developer at my company, and it looks like there are things to modify in the /var/www ... but it also looks like it's coming from the compiled code.

Can you list the modifications to /var/www you think you need?

At this level, there is nothing we can do ...

If you give me more information I could help. Are there any error messages in the log or in the browser?

Can you share your Alerta configuration? (redact any sensitive info)

from alerta.

CorentinH45 avatar CorentinH45 commented on September 25, 2024

Did you try making only the configuration changes I have suggested above? Did it work? Did anything work differently?
I can start the uwsgi service, it's just the login redirect that doesn't work

What changes did you need to make to oidc.py?
In the file "/opt/alerta/lib/python3.6/site-packages/alerta/auth/oidc.py", i've deleted the /auth to the following line :
image

Can you list the modifications to /var/www you think you need?
My colleague told me that there is a lot of reference to /auth from keycloak in the file : /var/www/html/js/auth.5ff10a4b.js

In my alerta confi, i have this related to keycloak :
image

from alerta.

satterly avatar satterly commented on September 25, 2024

This issue was raised #1680 and fixed #1683 already. It will be available in the next release.

from alerta.

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.