<commit_before># CASGO CAS Authentication Server

## What is CASGO?

Casgo is a simple to use, simple to deploy [Single Sign On](http://en.wikipedia.org/wiki/Single_sign-on) that uses the [CAS protocol](http://en.wikipedia.org/wiki/Central_Authentication_Service) developed by <NAME> of Yale University.

## CAS Spec

Casgo implements version 1.0 of the [CAS Specification](http://www.yale.edu/tp/cas/specification/CAS%202.0%20Protocol%20Specification%20v1.0.html) 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

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

## Getting started (from source code)

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

## Running tests

Tests are run using [Ginkgo](https://github.com/onsi/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

`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                 |ENV                  |default           |description                                        |
|-------------------------|---------------------|------------------|---------------------------------------------------|
|**Host**                 |HOST                 |"0.0.0.0"         |The host on which to run casgo                     |
|**Port**                 |PORT                 |"8080"            |The port on which to run casgo                     |
|**DBHost**               |DBHOST               |"localhost:28015" |The hostname of database instance                  |
|**DBName**               |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|INFO" |The default log level for casgo                    |


### 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)        |


### Contributing

0. Fork the repo
1. Install [Go](http://golang.org)
2. Install your database of choice (default is  [RethinkDB](http://rethinkdb.com))
3. Fix issues, make changes
4. Ensure Makefile functions correctly (`make all`/`make resources`/etc)
5. Pull Request
6. Receive thanks from the community<commit_msg>Update README for 0.1.0 release<commit_after># CASGO CAS Authentication Server

## What is CASGO?

Casgo is a simple to use, simple to deploy [Single Sign On](http://en.wikipedia.org/wiki/Single_sign-on) that uses the [CAS protocol](http://en.wikipedia.org/wiki/Central_Authentication_Service) developed by <NAME> of Yale University.

## CAS Spec

Casgo implements version 1.0 of the [CAS Specification](http://www.yale.edu/tp/cas/specification/CAS%202.0%20Protocol%20Specification%20v1.0.html) 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

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

## Getting started (from source code)

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

## Running tests

Tests are run using [Ginkgo](https://github.com/onsi/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

`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|INFO"       |The default log level for casgo                    |
|**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

0. Fork the repo
1. Install [Go](http://golang.org)
2. Install your database of choice (default is  [RethinkDB](http://rethinkdb.com))
3. Fix issues, make changes
4. Ensure Makefile functions correctly (`make all`/`make resources`/etc)
5. Pull Request
6. Receive thanks from the community
{'fraction_non_alphanumeric': 0.15067857557127942, 'fraction_numerical': 0.01589142790859529, 'mean_word_length': 1.900100908173562, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2688391', 'n_tokens_mistral': 2353, 'n_tokens_neox': 2203, 'n_words': 878}