Ad Widget

Collapse

SAML with Google Workspace

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KentW
    Junior Member
    • Nov 2020
    • 2

    #1

    SAML with Google Workspace

    Does anyone have SAML working between Zabbix and Google Workspace (previously G suite)?

    I presume that I enable SAML under Zabbix from the authentication configuration, and on the Google side, I add a new 'web and mobile' app.
    I'm just a little unsure which values to copy where between the Zabbix and Google configurations.
  • KentW
    Junior Member
    • Nov 2020
    • 2

    #2
    OK, that wasn't too hard after all.

    Zabbix side:

    Click image for larger version

Name:	zabbix.png
Views:	5512
Size:	36.9 KB
ID:	414108

    Google side:

    Click image for larger version

Name:	google.png
Views:	5627
Size:	79.3 KB
ID:	414109

    In addition to this, I copied the contents from the 'Certificate' section of the 'Download metadata' window (click the link from the menu on the left in the screenshot above) and pasted it into /user/share/zabbix/conf/certs/idp.crt

    Hopefully the above is enough for anyone else who get stuck like I was. Please get in touch if you need more info on setting up the Google Workspace side.

    Comment

    • Schmitz
      Junior Member
      • Dec 2020
      • 2

      #3
      Thx KentW.

      Unfortunately, I didn't manage to connect using those settings, I keep getting an error message from Google, after account selection :

      "Error: app_not_configured_for_user

      Service is not configured for this user."

      If I try the "Test SAML Login" from Google admin console I get another error message, but this time from Zabbix :

      You are not logged inMy setup is a Zabbix inside a docker, running on port 8080, and a reverse proxy outside the docker, managing the 443 port. I'm wondering if the problem is not related to this setup, but I have no clue how to tell zabbix his real url is https:// and not http://.


      Would you have any more advice ? I'm stuck on this :-)



      Comment


      • harshadineth
        harshadineth commented
        Editing a comment
        Did you manage to get it to work. I am also running the zabbix inside docker and the error I am getting is the request is redirected to the google workspace and after that I am getting This site can’t be zabbix.**.com took too long to respond.
    • kporembinski
      Junior Member
      • Aug 2021
      • 1

      #4
      I have the same issue. When. I'm testing I got:

      Error: not_a_saml_app

      Provided application is not a SAML app

      When I'm log off from Gmail account I'm getting:


      Error: app_not_configured_for_user

      Service is not configured for this user.

      I have setup SAML as show on screens.

      Comment

      • andyway85
        Junior Member
        • Oct 2021
        • 20

        #5
        Hi KentW

        I'm pretty much stucked in here...followed the instructions but have those errors...any guide where to look into?

        Test from G-Suite
        403. That’s an error.
        Error: not_a_saml_app

        Provided application is not a SAML app


        From Zabbix SAML authentication
        403. That’s an error.
        Error: app_not_configured_for_user


        Thanks!

        Comment

        • andyway85
          Junior Member
          • Oct 2021
          • 20

          #6
          Hi guys,

          Just in case, this is how it was solved

          1) It's very important to follow what KentW suggested: In addition to this, I copied the contents from the 'Certificate' section of the 'Download metadata' window (click the link from the menu on the left in the screenshot above) and pasted it into /user/share/zabbix/conf/certs/idp.crt, that is just copying the certificate that google shows and creating a file idp.crt and pasting that information on that route (at least at Ubuntu)
          2) On the mapping, the attribute username has to match what the zabbix Username attribute, also checking the Sign: Assertions and the SP Identity ID is the url of the same zabbix whether you have as a name or ip


          Click image for larger version

Name:	Screen Shot 2022-01-15 at 13.38.20.png
Views:	4615
Size:	63.1 KB
ID:	438170

          Click image for larger version

Name:	Screen Shot 2022-01-15 at 13.34.09.png
Views:	4643
Size:	901.8 KB
ID:	438171

          Click image for larger version

Name:	Screen Shot 2022-01-15 at 13.33.06.png
Views:	4639
Size:	1,023.2 KB
ID:	438172




          Then everything works great...just a final tip, log out from you google account when you test it on the browser, otherwise will prompt an error of permissions on Zabbix

          Finally, you have to manually create the user on Zabbix Users, the password don't matter you can type whatever password and will still log in with the google account password, but it has to be created, otherwise it won't work. That is how you assign the role and permission to the user

          Click image for larger version

Name:	Screen Shot 2022-01-15 at 13.49.44.png
Views:	4503
Size:	53.0 KB
ID:	438173

          For me at the beggining was like...ok but what if the user logs in with the google account and change the password locally, will the user log in without SAML? Well the answer is yes (so what's the point right?), but as a hint you can create a LDAP group pointing to nowhere and the user add it to that dummy group, then he still can change the password, but when trying to log in will prompt LDAP Group not working, and the only way the users can log in is with SAML


          Click image for larger version

Name:	Screen Shot 2022-01-15 at 13.58.10.png
Views:	4494
Size:	34.8 KB
ID:	438174

          Hope it helps!

          Best regards

          Comment

          • aziz.mestiri
            Junior Member
            • Feb 2022
            • 1

            #7
            hi,
            I want to know
            is it possible to use saml rcdev authentication with zabbix-server ??

            Comment

            • andyway85
              Junior Member
              • Oct 2021
              • 20

              #8
              what do you mean by rcdev authentication?

              Comment

              • lpossamai
                Senior Member
                • Jun 2018
                • 119

                #9
                Hi guys! I'm having some issues making this work on Zabbix 5.4.10.

                My Google SAML configuration looks like this:
                Click image for larger version  Name:	Screen Shot 2022-03-03 at 1.31.23 PM.png Views:	0 Size:	66.9 KB ID:	440789

                My Zabbix SAML settings looks like this:
                Click image for larger version  Name:	Screen Shot 2022-03-03 at 1.31.01 PM.png Views:	0 Size:	50.6 KB ID:	440790

                The error that I get is:
                Click image for larger version  Name:	Screen Shot 2022-03-03 at 1.34.03 PM.png Views:	0 Size:	24.6 KB ID:	440791

                And I have created a Zabbix username using the Google User's email address as the username.

                What am I missing here?

                Thanks!


                Edit:

                The Google Certificate is located under /usr/share/zabbix/conf/certs/idp.crt

                Comment


                • andyway85
                  andyway85 commented
                  Editing a comment
                  have you sign out of all gmail accounts in the explorer?
                  That error sometimes happens with my user when i have another google account looged in my browser

                • lpossamai
                  lpossamai commented
                  Editing a comment
                  Yes I have...
              • raditaz9
                Junior Member
                • Aug 2023
                • 1

                #10
                andyway85​ I am facing the below error on google saml
                I am using zabbix 6.4 version on ubuntu 22.04 LTS.



                Error: app_not_enabled_for_user

                Service is not enabled for this user.

                Request Details
                • idpid=C023q4x14
                • SAMLRequest=
                • RelayState=https://zabbix.com/index_sso.php
                Zabbix saml settings are:
                Click image for larger version

Name:	Screenshot 2023-08-08 at 5.44.49 PM.png
Views:	2611
Size:	72.6 KB
ID:	468534

                Am i missing anything here?

                Comment

                • foreachx1
                  Junior Member
                  • Sep 2024
                  • 1

                  #11
                  I had the same issue but figured out that I was proxying through Nginx and was missing some settings in the zabbix.conf.

                  Referencing this documentation: Zabbix Documentation - Setting Up Identity Provider

                  In addition, if Zabbix UI is behind a proxy or a load balancer, the custom use_proxy_headers option can be used:
                  • false (default) - ignore the option;
                  • true - use X-Forwarded-* HTTP headers for building the base URL.

                  If you're using a load balancer to connect to a Zabbix instance where the load balancer uses TLS/SSL but Zabbix does not, you must indicate the baseurl, strict, and use_proxy_headers parameters as follows:
                  php
                  Kopijuoti kodą
                  $SSO['SETTINGS'] = [ 'strict' => false, 'baseurl' => "https://zabbix.example.com/zabbix/", 'use_proxy_headers' => true ];
                  Here is an example configuration:
                  php
                  Kopijuoti kodą
                  $SSO['SETTINGS'] = [ 'security' => [ 'signatureAlgorithm' => 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha384', 'digestAlgorithm' => 'http://www.w3.org/2001/04/xmldsig-more#sha384', ], ];
                  This solved the issue for me!

                  Comment

                  Working...