imqsauth

command module
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2024 License: MIT Imports: 13 Imported by: 0

README

IMQS Authentication System

Other references

  1. Overview
  2. API
  3. Config schema
  4. Static conf

More information can be found in Confluence: Imqs Auth.

Building

To build imqsauth:

go build imqsauth.go

Testing

Note that github.com/IMQS/authaus has it's own set of tests, which we run in it's own CI job.

imqsauth has two set of tests: Go and ruby. The ruby tests hit the REST API.

The following block demonstrates running all of the tests:

go test github.com/IMQS/imqsauth/auth
go build imqsauth.go
gem install rest-client
ruby resttest.rb

Running

To run imqsauth and create a local postgres database, do

./imqsauth -c=example-local.conf createdb

You will need to have the appropriate postgres login setup on your database. See the example-local.conf file for those details.

Next, reset the authorization groups 'admin' and 'enabled'

./imqsauth -c=example-local.conf resetauthgroups

Create a user called 'root'

./imqsauth -c=example-local.conf createuser root PASSWORD

Grant the 'root' user 'admin' and 'enabled' rights

./imqsauth -c=example-local.conf permgroupadd root admin
./imqsauth -c=example-local.conf permgroupadd root enabled

To create a regular user, you would do the same thing, except leave out the permgroupadd root admin step.

To run the server:

./imqsauth -c=example-local.conf run
Running outside docker

The auth service is capable of detecting whether it is running inside or outside of Docker upon startup. It leverages the service discovery mechanism in the config service to transparently rewrite database connection configurations, as well as other serviceconfig utils to detect whether or not it is inside the auth service.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package imqsauth implements a service that answers various authentication and authorization questions.
Package imqsauth implements a service that answers various authentication and authorization questions.
Benchmark the latency involved when talking to another HTTP service on the same machine.
Benchmark the latency involved when talking to another HTTP service on the same machine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL