Skip to content

jostyee/casgo

 
 

Repository files navigation

CASGO CAS Authentication Server

What is CASGO?

Casgo is a simple to use, simple to deploy Single Sign On that uses the CAS protocol developed by Shawn Bayern of Yale University.

CAS Spec

Casgo implements version 1.0 of the CAS Specification as defined with a few key changes:

  • JSON is preferred over XML/plaintext responses
  • The /validate endpoint behaves as specified in CAS 1.0 (success/failure and the username of the user)
  • The /validate endpoint returns user attributes

Getting started

  1. Install your database of choice (default is RethinkDB, version 2.0+)
  2. Download the casgo binary for your operating system
  3. Ensure port 443 is open (and your database instance is at the right port, 28015 by default)
  4. Run the binary

Getting started (from source code)

  1. Install your database of choice (default is RethinkDB, version 2.0+)
  2. go get github.com/t3hmrman/casgo
  3. make (or go install/go build)
  4. Ensure port 443 is open (and your database instance is at the right port, 28015 by default)
  5. Add an exception for the included self-signed certificate
  6. casgo

Running tests

Tests are run using Ginkgo from the main directory casgo code directory, please ensure Ginkgo is installed.

Note As some tests rely on the database to be up, RethinkDB must be running.

make test

OR

cd cas && ginkgo -r

Options

Option Description
-config Specify a (JSON) configuration file for CasGo to use.

Configuration

By File

Casgo can be configured by file if you specify the -c/--config <filename> flag. See Options section for a full list of CASGO's command line options.

By ENV

Variable (json) ENV default description
host CASGO_HOST "0.0.0.0" The host on which to run casgo
port CASGO_PORT "8080" The port on which to run casgo
dbHost CASGO_DBHOST "localhost:28015" The hostname of database instance
dbName CASGO_DBNAME "casgo" The database name for casgo to use
templatesDirectory CASGO_TEMPLATES "templates/" The folder in which casgo templates reside
companyName CASGO_COMPNAME "companyABC" The database name for casgo to use
authMethod CASGO_DEFAULT_AUTH "password" The default (user) authentication method for casgo
logLevel CASGO_LOG_LVL "WARN DEBUG
tlsCertFile CASGO_TLS_CERT "fixtures/ssl/cert.pem" The TLS cert file that casgo will use
tlsKeyFile CASGO_TLS_KEY "fixtures/ssl/eckey.pem" The TLS key file that casgo will use

Database Schema

So what does the database that powers casgo look like?

Database Table Description
casgo tickets The authentication tickets currently in use by the casgo
casgo services Services authorized to use casgo
casgo users User data stored by casgo (if not using external auth)
casgo api_keys Authentication API keys (enabling non-web app authentication)

Contributing

  1. Fork the repo
  2. Install Go
  3. Install your database of choice (default is RethinkDB)
  4. Fix issues, make changes
  5. Ensure Makefile functions correctly (make all/make resources/etc)
  6. Pull Request
  7. Receive thanks from the community

About

Single Sign On (SSO) Central Authentication Server (CAS) written in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 77.2%
  • JavaScript 18.6%
  • CSS 2.7%
  • Python 1.4%
  • Makefile 0.1%