Coder Social home page Coder Social logo

jhoblitt / puppet-oauth2_proxy Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 23.0 64 KB

manages the oauth2_proxy reverse proxy with oauth authentication

Home Page: https://github.com/bitly/oauth2_proxy

License: Other

Ruby 71.69% Puppet 15.80% HTML 4.00% Shell 5.57% Dockerfile 2.94%

puppet-oauth2_proxy's Introduction

Puppet oauth2_proxy Module

Build Status

Table of Contents

  1. Overview
  2. Description
  3. Major API Changes
  4. Usage
  5. Limitations
  6. Versioning
  7. Support
  8. Contributing
  9. See Also

Overview

manages the oauth2_proxy reverse proxy with oauth authentication

Description

This module installs and configures the oauth2_proxy package and provides a minimal systemd service unit.

Log messages [from stdout & stderr] are sent to the systemd journal. This may be undesirable with moderate to high volumes of traffic.

Major API Changes

  • Version 1.x

Represents a significant and backwards incompatible API change.

Previously, the only public interface was through the oauth2_proxy classs and a single proxy instance was managed. As of 1.x, multiple proxy instances are supported via the oauth2_proxy::instance defined type.

Usage

Examples

include ::oauth2_proxy

::oauth2_proxy::instance { 'proxy1':
  config => {
    http_address      => '127.0.0.1:4180',
    client_id         => '1234',
    client_secret     => 'abcd',
    github_org        => 'foo',
    upstreams         => [ 'http://127.0.0.1:3000' ],
    cookie_secret     => '1234',
    pass_access_token => false,
    pass_host_header  => true,
    provider          => 'github',
    redirect_url      => 'https://foo.example.org/oauth2/callback',
    email_domains     => [ '*' ],
  }
}
class { '::oauth2_proxy':
  source   => 'https://github.com/bitly/oauth2_proxy/releases/download/v2.0.1/oauth2_proxy-2.0.1.linux-amd64.go1.4.2.tar.gz',
  checksum => '950e08d52c04104f0539e6945fc42052b30c8d1b',
}

::oauth2_proxy::instance { 'proxy1':
  config => {
    http_address      => '127.0.0.1:4180',
    client_id         => '1234',
    client_secret     => 'abcd',
    github_org        => 'foo',
    upstreams         => [ 'http://127.0.0.1:3000' ],
    cookie_secret     => '1234',
    pass_access_token => false,
    pass_host_header  => true,
    provider          => 'github',
    redirect_url      => 'https://foo.example.org/oauth2/callback',
    email_domains     => [ '*' ],
  }
}

Classes

oauth2_proxy

# defaults
class { '::oauth2_proxy':
  user         => 'oauth2',
  manage_user  => true,
  group        => 'oauth2',
  manage_group => true,
  install_root => '/opt/oauth2_proxy',
  source       => 'https://github.com/bitly/oauth2_proxy/releases/download/v2.0.1/oauth2_proxy-2.0.1.linux-amd64.go1.4.2.tar.gz',
  checksum     => '950e08d52c04104f0539e6945fc42052b30c8d1b',
}
user

String defaults to: oauth2

The name/uid of the system role account to execute the proxy process under and will have ownership of files.

manage_user

Boolean defaults to: true

Whether or not this module should manage the system role account to execute the proxy process under.

group

String defaults to: oauth2

The group/gid of the system role account and group ownership of files.

manage_group

Boolean defaults to: true

Weather or not this module should manage the group of the system role account.

install_root

String defaults to: /opt/oauth2_proxy

The dirname under which to install the proxy files.

source

String defaults to: <a long url>

The URL from which to download the oauth2_proxy binary. The file is assumed to be in tar.gz format.

checksum

String defaults to: <a sha1 checksum>

The sha1 format checksum of the source file.

Defines

oauth2_proxy::instance

# defaults
::oauth2_proxy::instance { 'proxy1':
  config         => { ... }, # mandatory
  manage_service => true,
}
config

Hash mandatory

A list of key/value pairs to be serialized into a configuration file @ /etc/oauth2_proxy/< title >.conf. No validation of this hash is done beyond checking the parameter type.

The configuration file parameters are similar to the CLI options but have some variance in terms of name and format. The oauth2_proxy.cfg.example provided is the best [only] documentation available beyond the source code itself.

Please note that oauth2_proxy does have several mandatory parameters and will fail to start-up if they are not present.

manage_service

Boolean defaults to: true

Whether or not to manage a service resource for the proxy instance.

Limitations

Tested Platforms

  • el7
  • ubuntu 14.04

Puppet Version Compatibility

Versions Puppet 2.7 Puppet 3.x Puppet 4.x
0.x unknown yes yes
1.x unknown yes yes

systemd

This module should in theory be able to function on any x86_64 Linux distribution that uses systemd for service management. However, since this has not been tested the module is limited to el7/x86_64.

Versioning

This module is versioned according to the Semantic Versioning 2.0.0 specification.

Support

Please log tickets and issues at github

Contributing

  1. Fork it on github
  2. Make a local clone of your fork
  3. Create a topic branch. Eg, feature/mousetrap
  4. Make/commit changes
    • Commit messages should be in imperative tense
    • Check that linter warnings or errors are not introduced - bundle exec rake lint
    • Check that Rspec-puppet unit tests are not broken and coverage is added for new features - bundle exec rake spec
    • Documentation of API/features is updated as appropriate in the README
    • If present, beaker acceptance tests should be run and potentially updated - bundle exec rake beaker
  5. When the feature is complete, rebase / squash the branch history as necessary to remove "fix typo", "oops", "whitespace" and other trivial commits
  6. Push the topic branch to github
  7. Open a Pull Request (PR) from the topic branch onto parent repo's master branch

See Also

puppet-oauth2_proxy's People

Contributors

brianeclow avatar jhoblitt avatar tnmt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

puppet-oauth2_proxy's Issues

Could not install module 'veepshosting-oauth2_proxy' due to missing dependency

Hi,
My puppet server is running on el9 and puppet server is 7.9.2
when I try to install either v1.0.1 or 1.0.0 I get the following error:

`puppet module install veepshosting-oauth2_proxy --version 1.0.0
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Error: Could not install module 'veepshosting-oauth2_proxy' (v1.0.0)
The requested version cannot satisfy one or more of the following installed modules:
puppetlabs-stdlib, installed: 8.5.0, expected: >= 4.6.0 < 9.0.0

Use puppet module install 'veepshosting-oauth2_proxy' --ignore-dependencies to install only this module`

I tried using the --ignore-dependencies and it did installed the module but when I run puppet agent -t on the agent I get this error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Could not find class ::archive for themachine.art (file: /etc/puppetlabs/code/environments/production/modules/oauth2_proxy/manifests/install.pp, line: 11, column: 3) on node [xxxx]

I really want to use your module, can you please help to fix the issue?
Thanks,
Roy

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.