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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?