You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -8,7 +8,7 @@ It makes running a Node deployment server as painless as possible.
8
8
9
9
## How does it work?
10
10
11
-
After starting Ishiki, an [API](#api) will be made available. With this API, you can deploy applications and manage
11
+
After starting Ishiki, an [API](#api) will become available. With this API, you can deploy applications and manage
12
12
them. If your application requires a specific version of Node, it will be set up automatically for you. Each application
13
13
will run on its own IP:port internally, while being proxied through the domains specified on your app on whatever public
14
14
port you want your sites to run on (e.g. 80).
@@ -39,6 +39,19 @@ Usage:
39
39
ishiki
40
40
```
41
41
42
+
### First time
43
+
44
+
When starting Ishiki for the first time, a default admin user will be created for you and a random password will be generated.
45
+
Ishiki should output something along the lines of:
46
+
47
+
```
48
+
Initial admin account created:
49
+
> username: ishiki
50
+
> password: 12345667890abcdef
51
+
```
52
+
53
+
Make sure you take good note of the password (you can change it later).
54
+
42
55
## Configuration
43
56
44
57
By default, Ishiki will run on the following settings:
@@ -59,6 +72,11 @@ By default, Ishiki will run on the following settings:
59
72
"database": "ishiki"
60
73
},
61
74
"logs-size": 100000,
75
+
"auth": {
76
+
"active": true,
77
+
"admin": "ishiki",
78
+
"token_expiry": 1800
79
+
},
62
80
"haibu": {
63
81
"env": "development",
64
82
"advanced-replies": true,
@@ -74,7 +92,7 @@ By default, Ishiki will run on the following settings:
74
92
}
75
93
```
76
94
77
-
Copy `config.sample.js` to `config.js` and modify if you want your own settings.
95
+
Copy `config.sample.js` to `config.js` and modify it if you want your own settings.
78
96
79
97
*`host` is the host Ishiki and its API will run on
80
98
*`port` is the port Ishiki and its API will run on
@@ -83,6 +101,7 @@ Copy `config.sample.js` to `config.js` and modify if you want your own settings.
83
101
*`port-range` is the range of ports the apps will listen on internally before being proxied
84
102
*`mongodb` is the configuration for the MongoDB database
85
103
*`logs-size` is the cap on the `log` MongoDB collection where all the user/app logs go
104
+
*`auth` is for authentication. Set `active` to `false` to disable authentication, `admin` is the default admin username, `token_expiry` is the time in seconds a token can remain valid without activity (`false` for no expiry)
86
105
*`haibu` is whatever settings are available to the haibu module
87
106
88
107
__Running Ishiki over HTTPS__
@@ -105,16 +124,102 @@ the `-k` (or `--insecure`) flag to ignore the verification.
105
124
<aname="api"/>
106
125
## API
107
126
108
-
Ishiki provides its own API
127
+
Ishiki provides its own API.
128
+
129
+
With authentication turned on (default), all calls (except for `/users/login`) will need to explicitly specify a `token` in the URL, such as:
The authentication token can be created with the help of [`/users/login`](#login)
135
+
136
+
#### _Permissions_
137
+
With the exception of logging in, permissions are as follow:
138
+
*[__users__](#users): admins can perform any action for any user, non-admins can only update their own password
139
+
*[__drones__](#drones): admins can performs any action for any user, non-admins can only perform actions relating to their own drones (where `/:userid` is present)
140
+
*[__proxies__](#proxies): only admins may use this
141
+
142
+
<aname="users"/>
143
+
### Users
144
+
145
+
#### `/users` (`GET`)
146
+
Returns a list of all users
147
+
148
+
#### Call example
149
+
```bash
150
+
curl -X GET <http|https>://<ishiki-ip>:<ishiki-port>/users?token=<my-token>
0 commit comments