Coder Social home page Coder Social logo

cesnet / perun-services Goto Github PK

View Code? Open in Web Editor NEW
9.0 8.0 43.0 3.27 MB

Scripts used by Perun to (de)provision services with authorization data

Home Page: https://perun-aai.org

License: BSD 2-Clause "Simplified" License

Perl 73.90% Shell 13.00% Makefile 0.72% Emacs Lisp 0.09% Elixir 0.08% PHP 0.07% Python 10.92% Roff 0.11% Euphoria 1.11%
perun

perun-services's Introduction

Perun

Perun services

This repository contains all scripts, which are used by Perun for provisioning and deprovisioning users to your services (managing access rights to them). Perun can manage any kind of a service, which has either accessible API or has accessible config files. We will be happy to help you with writing your own scripts for managing your service.

Repository information

All development takes place in public repository on our self-hosted GitLab instance. This repository is mirrored on GitHub for visibility.

See also other related repositories in the Perun IdM group.

Sources structure

  • gen/ - These perl scripts fetch data from Perun and generate new configuration files for each service and destination.
  • send/ - Scripts ensures transfer of configuration files to destination using SSH.
  • slave/ - These (mainly bash) scripts process new files on destination machine and perform change itself.
  • other/perun-propagate/ - New packaging of perun-propagate to force service propagation from client side.
  • other/perun-slave-metacentrum/ - Meta package to install all perun services used by MetaCentrum.

Gen and send scripts are located on your Perun instance and are used by perun-engine component. Slave scripts are then located on destination machines.

Build

  • Install required dependencies:

    apt-get install dh-make rpm equivs devscripts
  • Go to slave/ folder and run:

    make all

To build only specific service you can use make process-passwd for passwd service etc. To build a metapackage, which will install all slave scripts you can use make meta.

Deployment on destinations

Perun uses push model, so when configuration change occur in a Perun, new config files are generated for affected services and sent to the destinations, where they are processed. Result of such operation is then reported back to the Perun.

  • Slave scripts for each service can be automatically installed on destination machines as .deb or .rpm packages.

  • You must allow access to destination from your Perun instance by SSH key as user with all necessary privileges (usually root).

  • You can specify different user in Perun and it's good practice to restrict access on destination to run only command /opt/perun/bin/perun.

  • You can override default behavior of services on each destination by creating file /etc/perunv3.conf and put own config data here. As example, you can define white/black list of services, which you allow to configure on your destination. You can also set expected destination and facility names, so nobody can push own data to your destination from same Perun instance.

    # syntax: (item1 item2 item3)
    SERVICE_BLACKLIST=()
    SERVICE_WHITELIST=()
    DNS_ALIAS_WHITELIST=( `hostname -f` )
    FACILITY_WHITELIST=()

Service behavior and configuration

You can also configure each service on destination machine using pre and post scripts. Simply create folder /etc/perun/[service_name.d]/ (if not exists yet) and put your scripts into it. Name of the scripts are expected to be [pre/post]_[number]_filename. Scripts are processed in an alphabetical order.

Pre scripts are processed before slave script and post scripts are processed after. Pre scripts are usually used to configure the service. You can check example pre script for ldap service in slave/process-ldap/conf/ folder.

Contributing

If you want to contribute, you can check CONTRIBUTING.md for more details.

License

Our work is FreeBSD license, yet we sometimes use components under different licenses (e.g. Apache, GNU, CC).

© 2010-2024 CESNET, CERIT-SC and Masaryk University, all rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Acknowledgement

This work is co-funded by the EOSC-hub project (Horizon 2020) under Grant number 777536.

perun-services's People

Contributors

balcirakpeter avatar cuadradek avatar dbucik avatar dependabot[bot] avatar frantisekhrdina avatar hejdajakub avatar inkuzmin avatar johaney-s avatar kofzera avatar kuliak avatar licehammer avatar martin-kuba avatar mattjoke avatar melanger avatar metodej avatar michalberky avatar mvocu avatar peterlenyi avatar rosinec avatar sarkapalkovicova avatar smastrakova avatar stavamichal avatar sustr4 avatar tauceti2 avatar vojtech-sassmann avatar vyskocilpavel avatar xflord avatar xkostka2 avatar xkureck avatar zlamalp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.