uart

UART is an OAuth2 provider web application for Hyeoncheon project.

Github星跟踪图

It's UART

Build Status
Go Report Card
Maintainability
Test Coverage
Coverage Status
Codecov

UART is an Universal Authorizaion, Role and Team management service software.

UART was developed to succeed my old SiSO project, the original SSO service
for Hyeoncheon Project. (which was developed with Ruby on Rails framework
with well known Devise, OmniAuth and other open source components.)

UART is written in Go Language and also is built upon many open source
software modules including
OSIN OAuth2 server library
and powered by open source
Buffalo Go web development eco-system.

Feature

The main features are below:

  • Support sign on/in with social network accounts
    • currently Google, Facebook, and Github accounts are allowed.
  • (Future Plan) Email address based local authentication will be added soon.
    • This will be used as One-Time-Password option for other authentication.
  • Work as OAuth2 Provider to act as SSO authenticator for family projects.
  • OAuth2 Client App management with optional role based authorization.
    • Role management per each apps.
  • Support standard OAuth2 authorization process.
    • The format of Access Token is JWT(JSON Web Token).
    • Also provide /userinfo API endpoint.
  • Member management and per App roles.

Install

Installation procedure for Ubuntu Linux.

Requirement

Essential Build Environment

$ sudo apt-get update
$ sudo apt-get install build-essential
$ 

Install Golang

$ sudo mkdir -p /opt/google
$ cd /opt/google/
$ rm -f go
$ wget -nv https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz -O -, sudo tar zx
$ sudo mv go go-1.10
$ sudo ln -s go-1.10 go
$ cat >> ~/.bashrc <<EOF
> 
> ## GOLANG
> export GOPATH="\$HOME/go"
> export GOROOT="/opt/google/go"
> export PATH="\$PATH:\$GOPATH/bin:\$GOROOT/bin"
> 
> EOF
$ 
$ # source bashrc or restart the shell
$ mkdir $GOPATH
$ cd $GOPATH
$ 

Install Node.js with nvm

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh, bash
$ 
$ # source bashrc or restart the shell
$ nvm --version
0.33.2
$ nvm ls-remote --lts, tail -2
        v6.11.1   (LTS: Boron)
        v6.11.2   (Latest LTS: Boron)
$ nvm install lts/boron
$ node --version
v6.11.2
$ yarn --version
1.10.1
$ 

Get and Build UART

Get Source

$ go get github.com/hyeoncheon/uart
$ cd $GOPATH/src/hyeoncheon/uart
$ 

or

$ mkdir -p $GOPATH/src/github.com/hyeoncheon
$ cd $GOPATH/src/github.com/hyeoncheon
$ git clone https://github.com/hyeoncheon/uart.git
$ cd uart
$ 

Vendoring with Godep

$ go get -u github.com/golang/dep/cmd/dep
$ dep ensure
$ 

Get Buffalo and Build

$ go get -u github.com/gobuffalo/buffalo/buffalo
$ yarn
$ buffalo build
$ ls bin/uart
$ 

Install Files

$ export UART_HOME=/opt/hyeoncheon/uart
$ scripts/keygen.sh
$ mkdir -p $UART_HOME
$ install bin/uart $UART_HOME
$ cp -a messages files locales templates $UART_HOME
$ cp -a uart.conf $UART_HOME
$ cp -a supports/uart.service $UART_HOME
$ cp supports/uart.service $UART_HOME
$ cp supports/uart.conf.dist $UART_HOME/uart.conf
$ cp database.yml.dist $UART_HOME/database.yml
$ $EDITOR $UART_HOME/uart.conf
$ $EDITOR $UART_HOME/database.yml
$ 

and register it as system service

$ sudo systemctl enable $UART_HOME/uart.service
$ sudo systemctl is-enabled uart
enabled
$ 

Setup and Run

Configure Database

For development,

$ buffalo db create && buffalo db migrate
$ 

or

$ GO_ENV=production buffalo db create && GO_ENV=production buffalo db migrate
$ 

for production.

Run

$ sudo systemctl start uart
$ sudo systemctl status uart
● uart.service - UART server
   Loaded: loaded (/opt/hyeoncheon/uart/uart.service; linked; vendor preset: enabled)
   Active: active (running) since Wed 2017-11-08 19:03:54 KST; 30min ago
 Main PID: 15264 (uart)
    Tasks: 8
   Memory: 7.7M
      CPU: 352ms
   CGroup: /system.slice/uart.service
           └─15264 /opt/hyeoncheon/uart/uart

<...>
$ 

OK, Show Me the Shots

Login Screen

UART Login

Register New App

UART New App

Registered Apps

UART Apps

App Details

UART App Details

Membership

UART Membership

TODO

Author

Yonghwan SO https://github.com/sio4

Copyright 2016 Yonghwan SO

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 51
Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

主要指标

概览
名称与所有者hyeoncheon/uart
主编程语言Go
编程语言Go (语言数: 9)
平台
许可证GNU General Public License v3.0
所有者活动
创建于2017-07-25 16:55:56
推送于2022-09-20 17:03:51
最后一次提交
发布数1
最新版本名称v1.0.0 (发布于 )
第一版名称v1.0.0 (发布于 )
用户参与
星数1
关注者数1
派生数0
提交数108
已启用问题?
问题数0
打开的问题数0
拉请求数4
打开的拉请求数0
关闭的拉请求数9
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?