Coder Social home page Coder Social logo

cas-server's Introduction

move to CAS-X

CAS: Center Authorization Server

Coverage StatusBranch masterBuildGitHub licenserelease

CAS (pronounced case) is an authorization server. Its goal is to make application authorization as easy as possible.It provides a restful api and ldap support (cas-ldap is be used to support ldap protocol over restful api RFC 4511). CAS can be used to integrate with software which on support restful api or support ldap, and it have used to integrate gitlab、jira、confluence、jenkins、gerrit, vpn device, phabricator, grafana.

Table of Contents

Requirements

CAS requires the following to run:

  • Node.js 0.1-5, (personally recommand latest release version)
  • Npm (normally comes with Node.js)
  • Redis >2.8 (use redis as session store and message queue)
  • Mysql (persisted database)

Development

looking at config.js, setting the redis and mysql option

npm install # to install nodejs dependencies
NODE_ENV=dev node scripts/init_table.js # init mysql table
NODE_ENV=dev node scripts/create_user.js --username admin --admin # create first user
NODE_ENV=dev node webpack-dev-server.js # to start up webpack server for develop
NODE_ENV=dev node babel.index.js # to use koa2

Then you can open the http://127.0.0.1:3000 to login

Production

For initialize the database, please run the command as follow before startup application:

npm install --production
NODE_ENV=production node scripts/init_table.js # init mysql table
NODE_ENV=production node scripts/create_user.js --username admin --admin # create first user

For deploy node.js application, any process management like PM2、Forever、Supervisor is ok. Anyway, before startup CAS, you must should set environment variable as follow:

export CAS_MYSQL_USERNAME=cas
export CAS_MYSQL_PASSWORD=11111
export CAS_MYSQL_DATABASE=cas
export CAS_MYSQL_HOST=1.1.1.1
export CAS_MYSQL_PORT=3306
export CAS_SESSION_HOST=2.2.2.2
export CAS_SESSION_PORT=6379
export CAS_SESSION_DB=0
export CAS_SESSION_TTL=86400
export CAS_SESSION_KEY=whosyourdady
export CAS_PASSWORD_DEFAULT=youzan
export CAS_PASSWORD_BCRYPTLENGTH=12
export CAS_SYSLOG_TAG=cas
export CAS_SYSLOG_FACILITY=local6
export CAS_SYSLOG_HOSTNAME=3.3.3.3
export CAS_SYSLOG_PORT=514
export CAS_QUEUE_NAME=cas
export CAS_QUEUE_HOSTNAME=4.4.4.4
export CAS_QUEUE_PORT=6379
export CAS_QUEUE_DB=1
export CAS_CACHE_HOST=5.5.5.5
export CAS_CACHE_PORT=6379
export CAS_CACHE_TTL=3600
export CAS_CACHE_DB=2
export CAS_EMAIL_HOST=smtp.xxxx.com
export CAS_EMAIL_PORT=25
export CAS_EMAIL_SECURE=0
export [email protected]
export CAS_EMAIL_PASS=123123123
export [email protected]

Contributing

To contribute to CAS, clone this repo locally and commit your code on a separate branch.

Author

GitHub @detailyang
GitHub @Raistlin916
GitHub @NinoFocus

License

CAS is licensed under the [MIT] license.

cas-server's People

Contributors

detailyang avatar greenkeeperio-bot avatar ninofocus avatar wangchao0502 avatar

Watchers

 avatar  avatar  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.