Skip to content

Commit dbcb379

Browse files
authored
Merge pull request #12 from laincloud/audit
add audit
2 parents 72022eb + b2f72d6 commit dbcb379

File tree

731 files changed

+22048
-172193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

731 files changed

+22048
-172193
lines changed

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,28 @@ entry.iml
33
*.pyc
44
test.py
55
test_client.py
6+
vendor/
7+
prod.json
8+
9+
# React
10+
# See https://help.github.com/ignore-files/ for more about ignoring files.
11+
12+
# dependencies
13+
frontend/node_modules/
14+
15+
# testing
16+
/coverage
17+
18+
# production
19+
/build
20+
21+
# misc
22+
.DS_Store
23+
.env.local
24+
.env.development.local
25+
.env.test.local
26+
.env.production.local
27+
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*

Godeps/Godeps.json

Lines changed: 0 additions & 284 deletions
This file was deleted.

Godeps/Readme

Lines changed: 0 additions & 5 deletions
This file was deleted.

README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,30 @@
1010
## Licensing
1111
Entry is released under [MIT](https://github.com/laincloud/entry/blob/master/LICENSE) license.
1212

13-
## 打包上传到 PyPI
13+
## 部署
1414

15-
### 依赖
15+
### 配置
16+
17+
请参考 [example.json](example.json) 编写配置文件,并上传到 lvault:
1618

1719
```
18-
pip install twine # 上传工具
19-
pip install wheel # 打包工具
20+
lain secret add ${LAIN-Domain} web /lain/app/prod.json -f example.json
2021
```
2122

22-
### 打包上传
23+
> - `smtp.address` 需要包含端口,如:${mail-address}:25
24+
> - `smtp.password` 可选,为空时不使用 auth
25+
26+
## 审计
27+
28+
## 开发
29+
30+
### `swagger.yml` 生成代码
2331

2432
```
25-
rm -rf dist/ # 清空以前的构建
26-
python setup.py sdist # 打包源代码
27-
python setup.py bdist_wheel # 构建 wheel
28-
twine upload dist/* # 上传
33+
go get -u github.com/go-swagger/go-swagger/cmd/swagger # 安装 swagger
34+
swagger generate server -f ./swagger.yml -t server/gen # 生成代码
2935
```
36+
37+
- `server/gen` 下除 `server/gen/restapi/configure_entry.go` 外均由 `go-swagger` 生成,请不要手动修改
38+
- `server/gen/restapi/configure_entry.go` 包含初始化逻辑以及后端 API 配置
39+
- `server/handler` 包含后端 API 的实际逻辑

TODOs.org

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# TODOs
2+
3+
* TODO lain.yaml 里的前端编译
4+
* DONE 前端:sessions 的获取
5+
CLOSED: [2018-03-05 Mon 20:58]
6+
* DONE 前端:commands 标签页
7+
CLOSED: [2018-03-06 Tue 16:50]
8+
* DONE 前端:登录验证
9+
CLOSED: [2018-03-08 Thu 19:14]
10+
* DONE 前端:commands content
11+
CLOSED: [2018-03-09 Fri 20:16]
12+
* DONE 前端:sessions -> commands 跳转
13+
CLOSED: [2018-03-22 Thu 17:48]
14+
* DONE 后端:会话记录
15+
CLOSED: [2018-03-22 Thu 17:48]
16+
* DONE 前端:会话重放
17+
CLOSED: [2018-03-22 Thu 17:48]
18+
* TODO 后端:监控报警

docs/figures/audit.dot

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
digraph G {
2+
rankdir=LR;
3+
4+
lainAdmin [label="Admin"];
5+
bastion [label="Bastion"];
6+
lainNode [label="LAIN Node"];
7+
allContainers [label="All containers"];
8+
appOwner [label="App Owner"]
9+
ordinaryContainers [label="Containers other than entry"]
10+
11+
lainAdmin -> bastion;
12+
bastion -> lainNode [label="audit"];
13+
lainNode -> allContainers [label="docker exec"];
14+
15+
appOwner -> ordinaryContainers [label="Authentication, authorize, proxy and audit by entry"];
16+
}

docs/figures/audit.png

33.8 KB
Loading

0 commit comments

Comments
 (0)