ibm-cloud-solutions / hubot-ibmcloud-auth

Script package that provides simple whitelist access to commands in hubot scripts for IBM Cloud
http://www.ibm.com/
Other
0 stars 1 forks source link

Build Status Coverage Status Dependency Status npm

hubot-ibmcloud-auth

Script package that provides simple whitelist access to commands in hubot scripts for IBM Cloud. Two levels of access, reader and power, are offered.

Getting Started

Usage

Steps for adding this to your hubot:

  1. cd into your hubot directory
  2. Install this package via npm install hubot-ibmcloud-auth --save
  3. Add hubot-ibmcloud-auth to your external-scripts.json
  4. Add the necessary environment variables:
    HUBOT_IBMCLOUD_POWERUSERS=<comma-separated list of power-user emails -- no spaces!>
    HUBOT_IBMCLOUD_READERUSERS=<comma-separated list of reader-user emails -- no spaces!>
    HUBOT_IBMCLOUD_LDAP_PROTOCOL=<ldap or ldaps>
    HUBOT_IBMCLOUD_LDAP_SERVER=<LDAP server name>
    HUBOT_IBMCLOUD_LDAP_PORT=<LDAP port -- 1389>
    HUBOT_IBMCLOUD_LDAP_BIND_USER=<LDAP login user>
    HUBOT_IBMCLOUD_LDAP_BIND_PASSWORD=<LDAP login user password>
    HUBOT_IBMCLOUD_LDAP_ORG_ROOT=<LDAP organization root -- "dc=example,dc=com">
    HUBOT_IBMCLOUD_LDAP_EMAIL_FIELD=<LDAP user email field name -- mail>
    HUBOT_IBMCLOUD_LDAP_GROUP_MEMBERSHIP_FIELD=<LDAP group member field -- uniqueMember or memberuid>
    HUBOT_IBMCLOUD_LDAP_POWERUSERS_GROUP_DN_LIST=<semi-colon separated list of LDAP group distinguished names -- no spaces!>
    HUBOT_IBMCLOUD_LDAP_READERUSERS_GROUP_DN_LIST=<semi-colon separated list of LDAP group distinguished names -- no spaces!>
    HUBOT_IBMCLOUD_AUTHENTICATION_DISABLED=<only if desired, disables authentication and authorization if true)>
  5. Start up your bot & off to the races!

Access

Reader-level users have access to the following operations:

Power-level users have access to the following operations:

If a command is not listed, all users have access.

Development

Please refer to the CONTRIBUTING.md before starting any work. Steps for running this script for development purposes:

Configuration Setup

  1. Create config folder in root of this project.
  2. Create env in the config folder, with the following contents:
    HUBOT_IBMCLOUD_POWERUSERS=<comma-separated list of power-user emails -- no spaces!>
    HUBOT_IBMCLOUD_READERUSERS=<comma-separated list of reader-user emails -- no spaces!>
    HUBOT_IBMCLOUD_LDAP_PROTOCOL=<ldap or ldaps>
    HUBOT_IBMCLOUD_LDAP_SERVER=<LDAP server name>
    HUBOT_IBMCLOUD_LDAP_PORT=<LDAP port -- 1389>
    HUBOT_IBMCLOUD_LDAP_BIND_USER=<LDAP login user>
    HUBOT_IBMCLOUD_LDAP_BIND_PASSWORD=<LDAP login user password>
    HUBOT_IBMCLOUD_LDAP_ORG_ROOT=<LDAP organization root -- "dc=example,dc=com">
    HUBOT_IBMCLOUD_LDAP_EMAIL_FIELD=<LDAP user email field name -- mail>
    HUBOT_IBMCLOUD_LDAP_GROUP_MEMBERSHIP_FIELD=<LDAP group member field -- uniqueMember or memberuid>
    HUBOT_IBMCLOUD_LDAP_POWERUSERS_GROUP_DN_LIST=<semi-colon separated list of LDAP group distinguished names -- no spaces!>
    HUBOT_IBMCLOUD_LDAP_READERUSERS_GROUP_DN_LIST=<semi-colon separated list of LDAP group distinguished names -- no spaces!>
    HUBOT_IBMCLOUD_AUTHENTICATION_DISABLED=<only if desired, disables authentication and authorization if true)>

License

See LICENSE.txt for license information.

Contribute

Please check out our Contribution Guidelines for detailed information on how you can lend a hand.