Skip to content

Commit 0c8cff8

Browse files
initial
0 parents  commit 0c8cff8

32 files changed

+1924
-0
lines changed

.github/CONTRIBUTING.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Contributing Guidelines
2+
3+
:confetti_ball::medal_military: First of all, thank you for contributing! :medal_military::confetti_ball:
4+
5+
## Issue
6+
7+
- Search for an already opened [issue](https://github.com/ReasonSoftware/ssh-manager/issues) before submitting a [new one](https://github.com/ReasonSoftware/ssh-manager/issues/new/choose).
8+
- Provide as much information as you can.
9+
10+
## Pull Request
11+
12+
- Ensure [Pull Request](https://github.com/ReasonSoftware/ssh-manager/pulls) description clearly describes the problem and solution.
13+
- Make sure all Tests are passed and there is no Code Coverage degradation.
14+
- Add more tests wherever possible.
15+
- Please follow [AngularJS Commit Message Guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines)
+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
name: Report a Bug
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: anton-yurchenko
7+
8+
---
9+
10+
### Description
11+
12+
A clear and concise description of what the bug is
13+
14+
### Version
15+
16+
`Provide an Application Version`
17+
18+
*First log message contains the version number...*
19+
20+
### Log
21+
22+
```Attach an execution log```
23+
24+
*In case your security policy does not allow you to provide usernames, you may replace them with something like `user-1`/`user-2`.*
25+
26+
#### Sanitized Central Configuration
27+
28+
:warning: **Obfuscate real information** :warning:
29+
30+
<details><summary>Clich Here to Expand</summary>
31+
32+
```json
33+
{
34+
"users": {
35+
"user.1": "AAA",
36+
"user.2": "BBB",
37+
"user.3": "CCC",
38+
"user.4": "DDD",
39+
"user.5": "EEE",
40+
"user.6": "FFF"
41+
},
42+
"server_groups": {
43+
"backend": {
44+
"sudoers": [
45+
"user.2"
46+
],
47+
"users": [
48+
"user.1",
49+
"user.4",
50+
"user.5"
51+
]
52+
},
53+
"poc": {
54+
"sudoers": [
55+
"user.1",
56+
"user.2",
57+
"user.4"
58+
],
59+
"users": [
60+
"user.6"
61+
]
62+
},
63+
"devops": {
64+
"sudoers": [
65+
"user.2"
66+
],
67+
"users": [
68+
"user.3",
69+
"user.5"
70+
]
71+
}
72+
}
73+
}
74+
```
75+
76+
</details>
77+
78+
#### Sanitized Server Configuration
79+
80+
:warning: **Obfuscate real information** :warning:
81+
82+
<details><summary>Clich Here to Expand</summary>
83+
84+
```yaml
85+
secret_name: XXX
86+
groups:
87+
- A
88+
- B
89+
- C
90+
```
91+
92+
</details>
93+
94+
### Screenshots
95+
96+
If applicable, add screenshots to help explain your problem.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Suggest a Change
3+
about: Suggest an enhancement to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: anton-yurchenko
7+
8+
---
9+
10+
### Description
11+
A clear and concise description of what an enhancement is about
12+
13+
### Reference
14+
If applicable, add external documentation links.
15+
16+
### Screenshots
17+
If applicable, add screenshots to help explain your problem.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
## Description
2+
3+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
4+
5+
Fixes # (issue)
6+
7+
## Type of change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] This change requires a documentation update
15+
16+
## How Has This Been Tested
17+
18+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
19+
20+
- [ ] Test A
21+
- [ ] Test B
22+
23+
#### Test Central Configuration
24+
25+
<details><summary>Clich Here to Expand</summary>
26+
27+
```json
28+
{
29+
"users": {
30+
"user.1": "ssh-rsa AAA...",
31+
"user.2": "ssh-rsa AAA...",
32+
"user.3": "ssh-rsa AAA...",
33+
"user.4": "ssh-rsa AAA...",
34+
"user.5": "ssh-rsa AAA...",
35+
"user.6": "ssh-rsa AAA..."
36+
},
37+
"server_groups": {
38+
"backend": {
39+
"sudoers": [
40+
"user.2"
41+
],
42+
"users": [
43+
"user.1",
44+
"user.4",
45+
"user.5"
46+
]
47+
},
48+
"poc": {
49+
"sudoers": [
50+
"user.1",
51+
"user.2",
52+
"user.4"
53+
],
54+
"users": [
55+
"user.6"
56+
]
57+
},
58+
"devops": {
59+
"sudoers": [
60+
"user.2"
61+
],
62+
"users": [
63+
"user.3",
64+
"user.5"
65+
]
66+
}
67+
}
68+
}
69+
```
70+
71+
</details>
72+
73+
#### Test Server Configuration
74+
75+
<details><summary>Clich Here to Expand</summary>
76+
77+
```yaml
78+
secret_name: ssh-manager
79+
groups:
80+
- devops
81+
```
82+
83+
</details>
84+
85+
# Checklist
86+
87+
- [ ] My code follows the style guidelines of this project
88+
- [ ] I have performed a self-review of my own code
89+
- [ ] I have commented my code, particularly in hard-to-understand areas
90+
- [ ] I have made corresponding changes to the documentation
91+
- [ ] My changes generate no new warnings
92+
- [ ] I have added tests that prove my fix is effective or that my feature works
93+
- [ ] New and existing unit tests pass locally with my changes

.github/dependabot.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
assignees:
8+
- anton-yurchenko
9+
labels:
10+
- dependencies
11+
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: monthly
16+
target-branch: master
17+
assignees:
18+
- anton-yurchenko

.github/no-response.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Configuration for probot-no-response - https://github.com/probot/no-response
2+
3+
# Number of days of inactivity before an Issue is closed for lack of response
4+
daysUntilClose: 14
5+
# Label requiring a response
6+
responseRequiredLabel: more-information-needed
7+
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
8+
closeComment: >
9+
This issue has been automatically closed because there has been no response
10+
to our request for more information from the original author. With only the
11+
information that is currently in the issue, we don't have enough information
12+
to take action. Please reach out if you have or find the answers we need so
13+
that we can investigate further.

.github/workflows/release.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- v[0-9]+.[0-9]+.[0-9]+
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Init
13+
uses: actions/setup-go@v2
14+
with:
15+
go-version: 1.15
16+
id: go
17+
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Install Dependencies
22+
run: |
23+
go get -v -t -d ./...
24+
25+
- name: Lint
26+
run: |
27+
export PATH=$PATH:$(go env GOPATH)/bin
28+
curl -s https://api.github.com/repos/golangci/golangci-lint/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d : -f 2,3 | tr -d \" | wget -i -
29+
tar -xvf golangci-lint-*-linux-amd64.tar.gz --strip=1 --no-anchored golangci-lint
30+
./golangci-lint run ./...
31+
32+
- name: Test
33+
run: go test -v $(go list ./... | grep -v vendor | grep -v mocks) -race -coverprofile=coverage.txt -covermode=atomic
34+
35+
- name: Build
36+
run: GOOS=linux GOARCH=amd64 go build -o ssh-manager
37+
38+
- name: Pack
39+
run: zip ssh-manager.zip ssh-manager LICENSE.md
40+
41+
- name: Release
42+
uses: docker://antonyurchenko/git-release:latest
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
CHANGELOG_FILE: "CHANGELOG.md"
46+
ALLOW_TAG_PREFIX: "true"
47+
with:
48+
args: ssh-manager.zip

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# OS
2+
**/.DS_Store
3+
4+
# IDE
5+
.vscode/
6+
**/__debug_bin
7+
.idea/
8+
9+
# project
10+
coverage.txt
11+
/vendor/
12+
/release/
13+
/docs/schema.json
14+
/scripts/local.sh
15+
/ssh-manager
16+
/ssh-manager.zip
17+
var/

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## [1.0.0](https://github.com/ReasonSoftware/ssh-manager/releases/tag/v1.0.0) - 2021-02-10
2+
- First release

0 commit comments

Comments
 (0)