GithubHelp home page GithubHelp logo

isabella232 / cloud-authorization-buildpack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sap/cloud-authorization-buildpack

0.0 0.0 0.0 55.12 MB

You can use the content of this repository to leverage the [Open Policy Agent ](https://www.openpolicyagent.org/)for cloud foundry environments. If offers runtime support to make calls to the open policy server from a CF application and support to manage and distribute Open Policy Agent bundles.

License: Apache License 2.0

Shell 5.48% JavaScript 0.45% Clean 0.23% Makefile 0.90% Go 92.51% Dockerfile 0.42%

cloud-authorization-buildpack's Introduction

Buildpack User Documentation

REUSE status

This is a supply/sidecar buildpack which can't be used stand-alone. It has two major purposes. It defines a sidecar process which handles the authorization decisions. This sidecar is queried by the security client libraries. And it provides an upload mechanism for the applications base policy definitions to the Authorization Management Service.

Usage

Consume the latest released version of this buildpack with the following link in your manifest or via the -b flag:

https://github.com/SAP/cloud-authorization-buildpack/releases/latest/download/opa_buildpack.zip
We discourage referencing a branch of this repo directly because:

  • adds a start-up dependency to buildpacks.cloudfoundry.org, which we should avoid
  • staging time will be increased significantly
  • may contain potentially breaking changes

Services

Authorization Service (Legacy)

This buildpack expects to find a bound identity service containing "cert" and "key" values in the credentials. This instance must have registered an authorization instance as consumed service instance. This authorization instance also needs to be bound to this app and will be identified as follows:
By default this buildpack expect to find an "authorization" service binding in the VCAP_SERVICES. It's also possible to bind a user-provided service instead, when it has same structure as the "authorization" binding and is tagged with "authorization". Another way to override this behavior is to provide the environment variable AMS_SERVICE to target another service than "authorization"(e.g. "authorization-dev")

Identity Service

The buildpack expects to find a bound identity service containing "cert" and "key" values in the credentials, as well as authorization values (e.g. "authorization_url"). To create such an identity instance you need to provide the following provisioning parameters:

{
    "credential_type": "X509_GENERATED",
    "authorization": {
        "product_label":"<some text for the UI>"
    }
}

Support for DeployWithConfidence (DwC)

There is also DwC support, where no services are bound directly to the app. All communication will be proxied by the megaclite component of DwC. Therefor a user-provided service with name "megaclite" is expected, containing its "url".

Base Policy Upload

By default this buildpack doesn't upload any policies. To upload the base policies, provide the environment variable AMS_DCL_ROOT with the value of the path that contains the schema.dcl and the DCL packages. (For example in Spring /META-INF/classes; For other main buildpacks just the absolute folder relative to the project root). The buildpack will then upload all DCL files in all subfolders at the app staging. This enviromnent variable will be probably be replaced with an AMS config file end of Q4 2021(https://jtrack.wdf.sap.corp/browse/SECAUTH-1534)

Development

Prerequisites:

Run make test to run unit tests. Run make build to package the buildpack as a .zip file.

Reporting Issues

Open an issue on this project

Disclaimer

This buildpack is experimental and not yet intended for production use.

Licensing

Copyright 2020-2021 SAP SE or an SAP affiliate company and cloud-authorization-buildpack contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

cloud-authorization-buildpack's People

Contributors

d047491 avatar f-blass avatar pianocktail avatar sebastianwolf-sap avatar olafschmidt avatar nenaraab avatar saescha 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.