All Projects → google → hiba

google / hiba

Licence: BSD-3-Clause license
HIBA is a system built on top of regular OpenSSH certificate-based authentication that allows to manage flexible authorization of principals on pools of target hosts without the need to push customized authorized_users files periodically.

Programming Languages

c
50402 projects - #5 most used programming language
Roff
2310 projects
shell
77523 projects
M4
1887 projects
Makefile
30231 projects

Projects that are alternatives of or similar to hiba

ficam-playbooks
The Federal Identity Credentials and Access Management program publishes guides and playbooks to help U.S. federal executive agencies implement, maintain, and modernize identity management systems.
Stars: ✭ 30 (-90.99%)
Mutual labels:  authorization
laravel-roles-abilities-tutorial
Tutorial demonstrating the implementation of roles and abilities in Laravel
Stars: ✭ 16 (-95.2%)
Mutual labels:  authorization
nova-permissions
Add Permissions based authorization for your Nova installation via User-based Roles and Permissions. Roles are defined in the database whereas Permissions are defined in the code base.
Stars: ✭ 115 (-65.47%)
Mutual labels:  authorization
react-native-auth-example
🔑 React Native APP 身份验证模块示例
Stars: ✭ 53 (-84.08%)
Mutual labels:  authorization
folder-auth-plugin
Authorization Plugin for Jenkins that works on folders
Stars: ✭ 21 (-93.69%)
Mutual labels:  authorization
Authorization-Workshop
No description or website provided.
Stars: ✭ 14 (-95.8%)
Mutual labels:  authorization
dynamic-data-and-capabilities
[ARCHIVED] Dynamic Data and Capabilities in IPFS Working Group
Stars: ✭ 57 (-82.88%)
Mutual labels:  authorization
spring-boot-jwt-auth
🔑 Sample Spring boot application secured using JWT auth in custom header(X-Auth-Token).
Stars: ✭ 57 (-82.88%)
Mutual labels:  authorization
Gatekeeper
Lightweight library in C# for implementing roles-based access control (RBAC). With Gatekeeper, you can define users, roles, resources, and permissions, and authorize requests.
Stars: ✭ 25 (-92.49%)
Mutual labels:  authorization
jax-rs-pac4j
Security library for JAX-RS and Jersey
Stars: ✭ 48 (-85.59%)
Mutual labels:  authorization
fedramp-automation
FedRAMP Automation
Stars: ✭ 175 (-47.45%)
Mutual labels:  authorization
rust-spa-auth
Example application using a Vue frontend with Rust backend that has authentication + authorization.
Stars: ✭ 45 (-86.49%)
Mutual labels:  authorization
here-data-sdk-cpp
The HERE Data SDK for C++ is a modern, lightweight and modular SDK for the HERE platform
Stars: ✭ 47 (-85.89%)
Mutual labels:  authorization
ts-ucan
Auth tokens for a distributed, user-controlled world
Stars: ✭ 66 (-80.18%)
Mutual labels:  authorization
veriform
Security-oriented protobuf-like serialization format with "Merkleized" content hashing support
Stars: ✭ 114 (-65.77%)
Mutual labels:  authorization
tp5-rbac
一个tp5的RBAC库,使用composer来安装和更新你的项目对于RBAC的需求。同时支持jwt方式的验证。包含了RBAC需要的数据表的数据迁移,能够很方便的开始开发。
Stars: ✭ 69 (-79.28%)
Mutual labels:  authorization
authoreyes
A modern authorization plugin for Rails.
Stars: ✭ 13 (-96.1%)
Mutual labels:  authorization
XAF Security E4908
This repository contains examples for Role-based Access Control, Permission Management, and OData / Web / REST API Services for Entity Framework and XPO ORM
Stars: ✭ 47 (-85.89%)
Mutual labels:  authorization
rbac-tool
Rapid7 | insightCloudSec | Kubernetes RBAC Power Toys - Visualize, Analyze, Generate & Query
Stars: ✭ 546 (+63.96%)
Mutual labels:  authorization
athenz-client-sidecar
Moved to https://github.com/AthenZ/athenz-client-sidecar
Stars: ✭ 14 (-95.8%)
Mutual labels:  authorization

HIBA: Host Identity Based Authorization

Pronounce: /hiːba/

What is HIBA

HIBA is a system built on top of regular OpenSSH certificate-based authentication that allows to manage flexible authorization of principals on pools of target hosts without the need to push customized authorized_users files periodically.

The authorization is performed directly on the target host based on the user certificate content and the local host identity only. Not accessing external services makes it suitable for low dependency, last resort, SSH access.

For more details on how authorization is computed, see PROTOCOL.authorizations.

Concepts

HIBA defines two concepts: host identity and grants. See PROTOCOL.extensions for the exact specifications.

Host identity

This is a custom extension attached to host certificates that describes the main properties of a target host. The format is flexible and only mandates one field, domain, to help isolate different pools of hosts managed using the same CA keys.

An example of a host identity could be:

  • domain: dmz.example.com
  • owner: frontend-team
  • location: US

Grants

This is also a custom extension, attached to user certificates that describes which hosts this certificate should be accepted on. The grant contains a set of constraints that a host must match for the access to be authorized. These constraints are compared to the host identity at connection time by the hiba-chk helper. Due to the flexible nature of the host identity, the following semantics apply:

  • Any field present in the grant and missing for the host identity is considered invalid and will prevent access.
  • Any field missing from the grant and present in the host identity is ignored for authorization purposes (equivalent to a wildcard).

Mechanism

HIBA relies on a few properties provided by OpenSSH:

  • Certificate based authentication: a HIBA grant is a custom extension attached to the certificate. This means the CA is responsible for verifying the scope of the grant before attaching it. Similarly, the host identity is attached to the host certificate by the CA and must represent the target host.
  • AuthorizedPrincipalsCommand: this option of the sshd_config allows invoking an external tool to dynamically generate the content of authorized_users. This option is used to invoke hiba-chk, which knows how to extract the HIBA extensions from user and host certificates and grants or denies access based on the comparison.

GRL (Grant Revocation List)

HIBA allows revoking individual grants rather than the whole certificate. See PROTOCOL.grl for more information.

Note: revocations at the grant granularity are not yet supported. The rationale for not prioritizing these: full SSH certificate revocation is already supported by OpenSSH, only the finer granularity is lacking. Also, it is good practice to rely on short lived certificates, which often expire before the revocation list makes it to the target host.

Prerequisites

HIBA works on top of OpenSSH certificates. It relies on:

  • The AuthorizedPrincipalsCommand option that was added to OpenSSH 6.9
  • The %u and %k tokens that were added to OpenSSH 7.4

For compilation, configuration and installation instructions, see INSTALL.md.

Developers

The HIBA library can be used to add support for HIBA to a certificate authority.

Note: None of this code is thread safe, and it is the responsibility of the caller to ensure proper locking when accessing individual HIBA structures.

Generating HIBA enabled certificates

HIBA enabled certificates are generated using the HIBA API defined in extensions.h and the OpenSSH API defined in sshkey.h.

  • Using libhiba:
    • Import or generate the required HIBA extensions (identity or grant)
    • Serialize them into an sshbuf
  • Using libssh:
    • Import or generate the SSH public key
    • Attach generated extensions
    • Sign the certificate with the CA private key
    • Serialize it

For a simple local test setup see the testing section of INSTALL.md.

Reading HIBA enabled certificates

HIBA extensions can be extracted from existing certificates by relying on OpenSSH to decode/verify the certificate, extracting the HIBA extensions and interpreting them with HIBA.

  • Using libssh:
    • Import certificate
    • Verify certificate signature
    • List and extract relevant extensions
  • Using libhiba:
    • Parse extensions
    • Extract extensions' content

libhiba provides convenience functions to parse and extract HIBA extensions directly from a certificate, but it does not verify the certificate. It assumes the certificate was validated by a prior stage.

Example CA

See the CA documentation for a basic example of how the tools provided with HIBA can be used to manage extensions and certificates.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].