GithubHelp home page GithubHelp logo

biswajee / opa-linux-pam Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 297 KB

Using OPA and Linux-PAM to enforce fine-grained, host-level access controls over sudo.

open-policy-agent linux-pam github-workflows

opa-linux-pam's Introduction

OPA Linux PAM - Sudo authorization

The repository aims at reproduces the SSH and sudo authorization setup. However, instead of spinning up docker containers to execute the ssh and sudo instructions, it performs the sudo authorization on a linux setup running as the pipeline agent on Github workflows.

What do you need to understand this repository?

  1. Open Policy Agent
  2. An understanding of Linux & Linux PAM
  3. Github workflows

Architecture

Solution architecture

The solution consists of two services: client and a server. The server is located at the URL: http://opa-auth-server.herokuapp.com/ and is running an opa server with the sudo policy.

Execution and authorization resolution

Whenever an opa configured system runs a sudo command, the OPA PAM Client connects to the OPA Server for authorization. The successful execution of the sudo command in the client depends upon the outcome of the policy evaluation.

Reproducing the setup

All steps and configuration to reproduce the OPA PAM Setup on the Github pipeline can be found here. Explanations of each step can be found in the comments.

Exemplary outcomes

  1. Local Setup (Ubuntu-20.04) OPA PAM on local ubuntu-20.04 setup

  2. Pipeline setup (Ubuntu-20.04) HERE OPA PAM execution ubuntu-20.04 pipeline

Additional references

Please checkout the repository that spins up the remote authentication server here.

The setup is a POC only and contains several security loopholes. Please do not use it for production.

opa-linux-pam's People

Contributors

biswajee avatar

Stargazers

 avatar

Watchers

 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.