casgo
casgo copied to clipboard
Single Sign On (SSO) Central Authentication Server (CAS) written in Go
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 (deploying an instance of Casgo)
- Install your database of choice (default is RethinkDB, version 2.0+)
- Download the casgo binary for your operating system
- Ensure port 443 is open (and your database instance is at the right port, 28015 by default)
- Run the binary
Contributing to Casgo (setting up your local development environment)
- Install your database of choice (default is RethinkDB, version 2.0+)
- Install bower
-
bower install
- Install go.rice
-
go get github.com/t3hmrman/casgo
-
make all
(orgo install
/go build
) - Ensure port 443 is open (and your database instance is at the right port, 28015 by default)
-
casgo
NOTE - You may have to add an exception for the included self-signed certificate
You may also find it helpful to install Gin
Running tests
- (If using RethinkDB) Download the RethinkDB python driver
- Run
load-test-fixtures.sh
to load a running RethinkDB instance with fixture data. - Install ginkgo and agouti
-
ginkgo -r
(from the main casgo directory)
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 |
Contributing
- Fork the repo
- Follow the instructions for contributing to Casgo
- Fix issues, make changes
- Run tests, ensure make targets are functional
- Pull Request
- Receive thanks from the community