Solved

Probléme configuration openid

  • 4 February 2022
  • 42 replies
  • 1590 views

Badge +3
  • Steward *
  • 30 replies

Bonjour, je me permets de vous contacter, concernantl’utilisation OpenId Connect   je cherche de l'aide pour le mettre en place j’ai bien le Client ID et secret id avec BaseUrl  mais je n'arrive pas  à me connecter via  « connectWithOpenIdConnect »Aucun message « 504 Gateway Time-out « 

Centreon 21.04.04avec 21.0.7 pour le web 

J’ai des logs dans /var/log/centreon/login.log

Voici ma conf

*Screenshot deleted because of confidential information*

icon

Best answer by Laurent 9 February 2022, 11:08

View original

42 replies

Userlevel 6
Badge +18

Hi @idi can you ty to update to Centreon 21.04.10 and test agin?

 

Regards,

Badge +3

Hi @Laurent  

For the moment my manager does not wish to make a version upgrade.to upgrade just for the web? is possibly?

Regards,

Userlevel 6
Badge +18

Yes you can only update centreon-web and all dependencies using:

yum update centreon-web

Regards,

Badge +3

Hello @Laurent 

I have just updated the centreon-web to 21.04.10, I have this error now :
2022-02-07 12:18:08|-1|0|0|[OpenId] [Error] Unable to get Token Access Information: RestNotFoundException, message: Page not found
2022-02-07 12:18:08|-1|0|0|[OpenId] [Error] Unable to get login from claim: email

Regards,

Badge +3

Thanks to anyone who has an idea ;)

Badge +3

Hello @Laurent une idée svp

Userlevel 6
Badge +18

Hi @idi , the error message says: “message: Page not found”

It means that the Centreon central server can’t access to the /token endpoint.

Can you try to make a curl on this endpoint? 

Badge +3

Hi @Laurent 

indeed the curl does not respond

[root@br-hop-po15 ~]$curl https://login.microsoftonline.com/85eca096-674d-4fd9-9a9e-ae1178e2ee56/oauth2/v2.0/token

 

I think I have to configure my proxy to go out?

Userlevel 6
Badge +18

Yes if you need a proxy, you have to configure it into Centreon using “Administration > Parameters > Centreon UI” menu.

 

To test in CLI you need to use:

export http_proxy=http://myproxy:port
export https_proxy=https://myproxy:port

 

Badge +3

*Screenshot deleted because of confidential information*

Badge +3

Hi @Laurent 

I configured the proxy “Administration > Parameters > Centreon UI” menu.
unfortunately always errors

 

Userlevel 6
Badge +18

Ok now Centreon receive the token of the connected user on your IDP but Centreon can’t get additional information (token introspection endpoint).

 

Our documentation describes as examples:

Can you check your configuration?

Badge +3

Hi @Laurent 

I confirm that I have the same conf as what you told me. unfortunately always errors

*Screenshot deleted because of confidential information*

 

Badge +3

CONF side AZURE

Userlevel 6
Badge +18

@idi can you check with Microsoft if you need to use another endpoints?

We performed tests 3 months ago with this configuration and every was OK, may be they change their configuration.

But the good news is now Centreon passed 2 firsts steps:

  • Authentication to Microsoft IDP
  • Get authenticated user token

Only last two steps are missing

Badge +3

Hi @Laurent 

I don't know from whom? I will look at the microsoft docs.
Honestly, I've been struggling for 10 days to activate openid.Thanks again for your time,

Userlevel 6
Badge +18

@idi by exporting the proxy in a shell term, try to make curl on “Introspection Token Endpoint” as well as “User Information Endpoint”.

Regards,

Badge +3

Hi @Laurent 

after exporting the proxy
[root@br-hop-po15 ~]$curl https://login.microsoftonline.com/85eca096-674d-4fd9-9a9e-ae1178e2ee56/oauth2/v2.0/introspect

[root@br-hop-po15 ~]$curl https://graph.microsoft.com/oidc/userinfo
curl: (56) Received HTTP code 407 from proxy after CONNECT

Userlevel 6
Badge +18

Can you try by deleting “/introspect” endpoint (keep empty)?

 

Badge +3

Hi @Laurent   

after adding microsoft.com in my proxy whitelist it works again

[root@br-hop-po15 ~] /var/log/centreon]$ curl https://graph.microsoft.com/oidc/userinfo
{"error":{"code":"InvalidAuthenticationToken","message":"Access token is empty.","innerError":{"date":"2022-02-08T14:54:43","request-id":"8c49f075-2dd3-48d3-8223-48c73a7ef963","client-request-id":"8c49f075-2dd3-48d3-8223

Badge +3

tout ça comme endpoint: coté équipe AZURE

*Screenshot deleted because of confidential information*

 

Userlevel 6
Badge +18

@idi so everything is working now?

Badge +3

Can you try by deleting “/introspect” endpoint (keep empty)?

 

already tested nothing happens when I click on

 

Userlevel 6
Badge +18

Can you give me complete error log trace (/var/log/centreon/login.log) when you click on button?

Badge +3

deleting “/introspect” 

no trace in the logs /var/log/centreon/login.log

Reply