• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Site Plugin

    Scheduled Pinned Locked Moved
    General
    6
    16
    4.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      Fernando Gietz Developer
      last edited by

      Hi!!!

      I am developing a new plugin, after AccessControl plugin, now Site plugin šŸ™‚
      With AccessControl Plugin we can control the access to the items of the webUI using roles. Now, with the Site Plugin we can control the access to the hosts by user using his physical location.

      Site is not Location šŸ™‚

      With Location plugin we can manage the storage nodes from the hosts will download the images, snapins, … With Site plugin we can have more granularity, we can define as Sites as we need (IT room, labs, …) and associate the host to these sites. We can associate one user to one or more sites, in this way, the user only will see the hosts which are in his sites and not the others.

      4_1491923234514_sitePlugin5.png

      3_1491923234514_sitePlugin4.png

      2_1491923234514_sitePlugin3.png

      1_1491923234514_sitePlugin2.png

      0_1491923234513_sitePlugin1.png

      1 Reply Last reply Reply Quote 3
      • Lee RowlettL
        Lee Rowlett Developer
        last edited by

        Very nice addition! well done!

        1 Reply Last reply Reply Quote 0
        • Wayne WorkmanW
          Wayne Workman
          last edited by

          I think this is only going to confuse people. We have the location plugin, now site plugin. These words are synonyms. Why couldn’t the location plugin’s functionality be extended?

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          F 1 Reply Last reply Reply Quote 0
          • F
            Fernando Gietz Developer @Wayne Workman
            last edited by

            @Wayne-Workman I agree with you, and it is a little confusing.

            But the philosophy of Location plugin is different.
            From https://wiki.fogproject.org/wiki/index.php?title=Location_Plugin:

            The location plugin is for use in multi-node fog setups that have a large distance or limited amount of bandwidth between each node’s network. The location plugin allows you to restrict a host’s storage node selection when imaging or other tasks occur.

            At first I tried to use Location plugin to do the filters in the searches, and worked well but the Locations have limitations. The big one is that you can only define one location per storage node šŸ™‚ And I need more granularity. In my case I have one storage node to manage 7000 hosts in 50 buildings with 60 technicians. I don’t need the Location plugin but I need the Site plugin.

            We could extend the scope of Location plugin and rewrite the plugin šŸ˜‰

            Wayne WorkmanW 1 Reply Last reply Reply Quote 1
            • Wayne WorkmanW
              Wayne Workman @Fernando Gietz
              last edited by

              @Fernando-Gietz Ok then - but perhaps a different name then? How about ā€œSite Controlā€ similarly named after ā€œAccess Controlā€.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 1
              • F
                Fernando Gietz Developer
                last edited by

                @Wayne-Workman said in Site Plugin:

                @Fernando-Gietz Ok then - but perhaps a different name then? How about ā€œSite Controlā€ similarly named after ā€œAccess Controlā€.

                Yes, is a good idea. I need change somethings in the code … rename all clases XD

                1 Reply Last reply Reply Quote 1
                • F
                  Fernando Gietz Developer
                  last edited by

                  Well I have finished the beta version, you can test it from the last RC version (1.4.0-RC12).

                  What does the site plugin do?
                  The site plugin allows you to restrict/control the access and the searches of hosts to one or more sites. When you associate one user to a site, this user only can see the hosts which are linked/located to this site. This plugin restricts the access to hosts in the task menu too, the user only can see the tasks of his hosts.

                  Brief operation instructions

                  1. Install the plugin
                  2. Go to Site Manager Menu
                  3. Create a New Site
                    3.1) Enter the site name and his description
                  4. Link the hosts to the site. You can do it from the host menu or from group menu
                    4.1) From host menu: Enter in the host General tab and select the site from ā€œAssociate Host to a siteā€ dropbox
                    4.2) From group menu: with this option you can link multiple hosts to one site. Go to the ā€œSite Associationā€ tab and select the site from the dropbox.
                  5. Link users to one site
                    5.1) Go to Site Manager menu.
                    5.2) Search or list the Sites. Choose the site.
                    5.3) Go to membership tab
                    5.4) Check the checkbox to show the user list
                    5.5) Select the users which you want to link to the Site
                    5.6) click the ā€œAdd User to Siteā€ button
                  6. Restrict the access to the users
                    6.1) Go to User Menu
                    6.2) Search the user and select it. In the list you can see the sites that are inked to the user and if is a restrinc user.
                    6.3) Go to General tab
                    6.4) If you want to restrict the user, check the ā€œIs restricted userā€ checkbox
                    6.5) Click ā€œUpdateā€ button
                  Tom ElliottT 1 Reply Last reply Reply Quote 1
                  • Tom ElliottT
                    Tom Elliott @Fernando Gietz
                    last edited by

                    @Fernando-Gietz

                    I feel I should add, I’ve modified the plugin a little bit to enable the ā€œcommonā€ look and feel of other ā€œmembershipā€ elements.

                    Site plugin originally only allowed removing hosts, but had no way to associate hosts ā€œen-massā€. This is now corrected for in dev-branch as well.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    1 Reply Last reply Reply Quote 1
                    • R
                      ragnurenson
                      last edited by

                      Hello @Fernando-Gietz.

                      Nice to see you are still working on FOG. I was using your FOGehu fork during years at my laboratory in the University, and now I started to use original FOG versión 1.5.5 again. Have you any plan to make your site plugin working with this version?
                      I’m using access-control plugin, and really need the site plugin to control users only see their computers, not the entire building hosts.

                      Thanks again for your work.

                      1 Reply Last reply Reply Quote 0
                      • F
                        Fernando Gietz Developer
                        last edited by

                        Hi @ragnurenson ,
                        Actually I don’t use the site plugin, then I don’t know that it fails. I will try to see what happens with it, and fix the bug šŸ™‚

                        fenix_teamF 1 Reply Last reply Reply Quote 2
                        • fenix_teamF
                          fenix_team @Fernando Gietz
                          last edited by

                          @Fernando-Gietz your plugin is just the piece that is missing on my infrastructure so I can control access from other departments to FOG interface and storages. If I can provide any help on the issue just let me know, thank you!

                          1 Reply Last reply Reply Quote 0
                          • F
                            Fernando Gietz Developer
                            last edited by Fernando Gietz

                            @ragnurenson , @fenix_team I have fixed the bugs in working branch. Works so fine that now I am using it XD

                            Site plugin version 1.5.5_1

                            fenix_teamF 1 Reply Last reply Reply Quote 1
                            • fenix_teamF
                              fenix_team @Fernando Gietz
                              last edited by

                              @Fernando-Gietz hello Fernando, I don’t know if I’m doing it right… My FOG version is 1.5.5 straight out of the master branch. I’ve created a Site, included an user in Membership and a list of hosts that user has the right to find in searches. But when I log in with that user credentials, it’s still able to find hosts in and out of the Site associated hosts list!

                              I have the Access Control and Location plugin installed as well.

                              1. Host association screen (should find ONLY hosts that starts with ā€œFENGā€)
                                1.png

                              2. Logged in as target limited user, hosts that are not ā€œFENGā€ are still displaying!
                                2.png

                              Any help will be largely appreciated, thanks in advance!

                              R 1 Reply Last reply Reply Quote 0
                              • R
                                ragnurenson @fenix_team
                                last edited by

                                @fenix_team Hi! @Fernando-Gietz had revised the plugin to work with 1.5.5 version, but the changes are only at working_dev branch by now. You can make the changes by yourself.

                                link text

                                In the file /var/www/html/fog/lib/plugins/site/pages/sitemanagementpage.class.php, you must replace the line 114

                                  'hosts' => $Site->getHostCount()
                                

                                , with this code:

                                                'hosts' => self::getClass('SiteHostAssociationManager')
                                                		->count(
                                                        		['siteID' => $Site->id]
                                                		)
                                

                                Hope this can help you.

                                fenix_teamF 2 Replies Last reply Reply Quote 1
                                • fenix_teamF
                                  fenix_team @ragnurenson
                                  last edited by fenix_team

                                  @ragnurenson Hello! Thank you for sharing this! I’ve updated the file as suggested, but unfortunately it didn’t change anything, I’m still capable of finding unwanted hosts while logged in with my limited account.

                                  I believe the bug @Fernando-Gietz fixed was just concerning the host count that shows on Site Management page when you list All Sites. That feature was fixed after updating the file, indeed! But the listing problems are still lingering, at least for me…

                                  I did a test putting a single host in this Site, then I’ve searched the partial name and it shows up with all the other ones, as the plugin has no effect.

                                  smt.png

                                  This is my limited user account configs. As you can see, it’s correctly enrolled with the created Site called ā€œSMTā€.
                                  role.png

                                  [EDIT] - I found the commit concerning the right updates! I will test them and report later, thanks everyone!

                                  1 Reply Last reply Reply Quote 0
                                  • fenix_teamF
                                    fenix_team @ragnurenson
                                    last edited by fenix_team

                                    @ragnurenson so, I’ve just tested after applying the commited changes and everything works fine! Thank you for pointing out the github commit and thanks @Fernando-Gietz for the awesome work!

                                    If I can make a suggestion, I’d say it would be nice to have that search filter implemented in ā€œList All Hostsā€ screen on Active Tasks!

                                    1 Reply Last reply Reply Quote 0
                                    • 1 / 1
                                    • First post
                                      Last post

                                    328

                                    Online

                                    12.0k

                                    Users

                                    17.3k

                                    Topics

                                    155.2k

                                    Posts
                                    Copyright Ā© 2012-2024 FOG Project