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
For convenience the ops/local directory contains a "run-sentrius.sh" script which will start the core and api modules. You can run this script from the project root:
92
+
93
+
./ops/local/run-sentrius.sh
94
+
95
+
You are welcome to run the core and api modules separately, as needed. You can start the core module by running:
96
+
97
+
mvn install
98
+
cd api
99
+
mvn spring-boot:run
100
+
89
101
Build the Project
90
102
91
103
Sentrius uses Maven for its build process. Ensure Maven is installed and then run:
The API often needs separate configurations for its own port, API versioning, or logging settings.
124
148
125
149
Feel free to structure your configs based on your environment (dev/test/prod). For large-scale deployments, we recommend using a secure secrets manager (HashiCorp Vault, AWS Secrets Manager, etc.) to avoid storing sensitive information in plain text.
126
-
Running Sentrius
127
-
1. Running the Core
128
-
129
-
Navigate to the core sub-project:
130
-
131
-
cd core
132
-
mvn spring-boot:run
133
-
134
-
Once the core service is running, it will initialize the necessary security policies, database migrations, and SSH session handling.
135
-
2. Running the API
136
-
137
-
In a separate terminal, navigate to the api sub-project:
138
-
139
-
cd api
140
-
mvn spring-boot:run
141
-
142
-
The API will connect to the running core service and expose the REST endpoints (by default) at http://localhost:8080/api/v1/.
143
-
Usage
144
-
145
-
Below are examples of how to interact with Sentrius via the REST API. These can be tested using cURL, Postman, or any other HTTP client.
146
-
1. Create an Enclave
147
-
148
-
POST /api/v1/enclaves
149
-
Content-Type: application/json
150
-
151
-
{
152
-
"name": "Production Servers",
153
-
"description": "Access group for production nodes"
154
-
}
155
-
156
-
2. Add a Host to an Enclave
157
-
158
-
POST /api/v1/enclaves/{enclaveId}/hosts
159
-
Content-Type: application/json
160
-
161
-
{
162
-
"host": "192.168.1.10",
163
-
"username": "admin",
164
-
"port": 22
165
-
}
166
-
167
-
3. Establish a Secure Connection
168
-
169
-
POST /api/v1/ssh/connect
170
-
Content-Type: application/json
171
-
172
-
{
173
-
"enclaveId": "12345",
174
-
"hostId": "67890"
175
-
}
176
-
177
-
If your zero trust policies allow the connection, Sentrius will open a secure SSH session. The connection details (session ID, session logs, etc.) can be accessed through further API endpoints.
178
-
API Documentation
179
-
180
-
Sentrius uses Swagger for API documentation. Once the api module is running, browse to:
181
-
182
-
http://localhost:8080/swagger-ui.html
183
150
184
-
Here, you can explore all available endpoints, models, and request/response structures.
185
-
For advanced use cases, consult the automatically generated openapi.json/openapi.yaml file.
186
-
Deployment to Google Kubernetes Engine (GKE)
187
151
188
152
Sentrius can be containerized and deployed to a Kubernetes cluster. You can use the provided Helm script in ops-scripts/gcp/deploy-helm.sh to manage the deployment.
0 commit comments