An open API service indexing awesome lists of open source software.

https://github.com/windomz/go-rbac

:ghost: A simplified role-based access control (RBAC) implementation.
https://github.com/windomz/go-rbac

go golang rbac role-based-access-control

Last synced: 3 months ago
JSON representation

:ghost: A simplified role-based access control (RBAC) implementation.

Awesome Lists containing this project

README

        

# go-rbac
[![Build Status](https://travis-ci.org/WindomZ/go-rbac.svg?branch=master)](https://travis-ci.org/WindomZ/go-rbac)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Coverage Status](https://coveralls.io/repos/github/WindomZ/go-rbac/badge.svg?branch=dev)](https://coveralls.io/github/WindomZ/go-rbac?branch=dev)

A simplified role-based access control (RBAC) implementation,
inspired by [gorbac](https://github.com/mikespook/gorbac)

![v1.0.0](https://img.shields.io/badge/version-v1.0.0-green.svg)
![status](https://img.shields.io/badge/status-stable-green.svg)

## Purpose

* Only three objects: `identity`, `role` and `permission`
* One to many relationship between `identity` and `roles`.
* One to many relationship between `role` and `permissions`.
* One to many relationship between `role` and parent `roles`(inheritance relationship).

## Features

- [x] An `identity` has one or more `roles`.
- [x] A `role` has one or more `permissions`.
- [x] A `role` can inherit one or more other `roles`(inheriting their `permissions`).
- [x] Both `identity`, `role`, `permission` are defined by ID string.
- [x] Native and no third party library dependent, except unit testing

## Installation

```
go get -u github.com/WindomZ/go-rbac
```

## License

The [MIT License](https://github.com/WindomZ/go-rbac/blob/master/LICENSE)