Skip to content

Commit c1da061

Browse files
committed
update
1 parent 5ad08a8 commit c1da061

File tree

12 files changed

+135
-906
lines changed

12 files changed

+135
-906
lines changed

README.md

Lines changed: 135 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,181 +1,223 @@
11
Sentrius
22

3-
Sentrius is a secure shell access management solution that integrates zero trust principles to protect your infrastructure. Sentrius is divided into two primary Maven sub-projects: core and api. The core sub-project handles core functionalities such as enforcing zero trust policies, while the api sub-project is responsible for providing a REST API to interact with these functionalities.
3+
![image](docs/images/mainscreen.png)
4+
Sentrius is a secure shell (SSH) access management solution that integrates zero trust principles to protect your infrastructure. It is split into two primary Maven sub-projects:
45

5-
Internally Sentrius is formerly known as SSO ( SecureShellOps ).
6+
core – Handles the core functionalities (e.g., SSH session management, zero trust policy enforcement).
7+
api – Provides a RESTful API layer to interface with the core module.
68

7-
Project Structure
8-
9-
Sentrius consists of the following sub-projects:
10-
11-
Core: The core functionality of Sentrius, which manages SSH connections and enforces security rules. This includes:
12-
13-
Enclave management
9+
Internally, Sentrius may still be referenced by its former name, SSO (SecureShellOps), in certain scripts or configurations.
10+
Table of Contents
1411

15-
Zero trust policy enforcement
12+
Key Features
13+
Project Structure
14+
Prerequisites
15+
Installation
16+
Configuration
17+
Running Sentrius
18+
Usage
19+
API Documentation
20+
Deployment to Google Kubernetes Engine (GKE)
21+
Contributing
22+
License
23+
Contact
1624

17-
Secure connection handling
25+
Key Features
1826

19-
API: A RESTful interface for interacting with the Sentrius core functionalities. The API allows users to create, manage, and visualize SSH enclaves and security rules in a flexible way.
27+
Zero Trust Security
28+
Sentrius enforces zero trust policies, ensuring that every SSH connection is authenticated, authorized, and constantly monitored.
2029

21-
Features
30+
SSH Enclaves
31+
Group hosts into logical enclaves and apply role-based access control for fine-grained permissions. Simplify security oversight by separating and organizing your infrastructure.
2232

23-
Zero Trust Security: Implements zero trust principles to ensure every connection is authenticated and authorized in real-time.
33+
Dynamic Rules Enforcement
34+
Define flexible, context-aware rules that adapt to real-time changes in your environment (e.g., user risk score, time of day, IP ranges).
2435

25-
SSH Enclaves: Manage host groupings through enclaves, providing role-based access control to specific nodes.
36+
REST API
37+
Manage your SSH configurations, enclaves, security rules, and sessions programmatically using a well-documented REST API.
2638

27-
Dynamic Rules Enforcement: Define and enforce zero trust rules at runtime, ensuring the security policies adapt to changing contexts.
39+
Project Structure
2840

29-
REST API: Offers a fully accessible REST API to manage SSH configurations, enclaves, and rules programmatically.
41+
Sentrius consists of multiple sub-projects:
42+
43+
core
44+
Contains business logic, including:
45+
Enclave management
46+
Zero trust policy enforcement
47+
Secure SSH connection handling
48+
49+
api
50+
A RESTful interface for interacting with the core functionalities. The api module exposes endpoints that let you:
51+
Create and manage enclaves
52+
Configure security rules
53+
Visualize SSH sessions and logs
54+
Handle user access and authentication
55+
56+
sentrius/
57+
├── core/
58+
│ ├── src/
59+
│ └── pom.xml
60+
├── api/
61+
│ ├── src/
62+
│ └── pom.xml
63+
├── ops-scripts/
64+
│ └── gcp/
65+
│ └── deploy-helm.sh
66+
├── pom.xml
67+
└── ...
3068

3169
Prerequisites
3270

33-
Java 11 or later
34-
35-
Apache Maven 3.6+
36-
37-
A database (e.g., PostgreSQL, MySQL) configured for storing session and configuration data
71+
Java 11 or later
72+
Apache Maven 3.6+
73+
Database (PostgreSQL, MySQL, etc.) for storing session and configuration data
74+
(Optional) Docker & Kubernetes if you plan to deploy on a containerized environment
3875

3976
Installation
4077

41-
Clone the Repository
78+
Clone the Repository
4279

43-
$ git clone https://github.com/your-repo/sentrius.git
44-
$ cd sentrius
80+
git clone https://github.com/your-organization/sentrius.git
81+
cd sentrius
4582

4683
Build the Project
4784

48-
Sentrius uses Maven for building the project. Make sure you have Maven installed.
85+
Sentrius uses Maven for its build process. Ensure Maven is installed and then run:
4986

50-
$ mvn clean install
87+
mvn clean install
5188

52-
This command will build both the core and api sub-projects.
89+
This command will build both the core and api sub-projects, downloading any required dependencies.
5390

5491
Configuration
5592

56-
Sentrius requires configuration files for both core and api to be set up before running. Create a configuration file for each module in src/main/resources/application.properties or provide your own external configuration.
93+
Sentrius requires properties in order to connect to databases, authenticate users, and configure SSH session parameters. You can supply them in src/main/resources/application.properties or via external configuration (e.g., environment variables or config files).
5794

58-
Configuration properties include:
95+
Typical settings include:
5996

60-
Database configuration
97+
Database Configuration
6198

62-
SSH Settings (e.g., ports, timeouts)
99+
spring.datasource.url=jdbc:postgresql://localhost:5432/sentrius
100+
spring.datasource.username=postgres
101+
spring.datasource.password=postgres
102+
spring.jpa.hibernate.ddl-auto=update
63103

64-
Security parameters for JWT or OAuth integration
104+
Security & Authentication
65105

66-
Running Sentrius
106+
# JWT or OAuth
107+
sentrius.security.jwt.secret=YOUR_SECRET_KEY
108+
sentrius.security.jwt.expiration=3600
67109

68-
Running Core
110+
SSH Settings
69111

70-
Navigate to the core sub-project and run it using Maven:
112+
sentrius.ssh.port=22
113+
sentrius.ssh.connection-timeout=30000
71114

72-
$ cd core
73-
$ mvn spring-boot:run
115+
Core and API Specifics
116+
Core might need additional application-specific properties (e.g., caching, logging).
117+
The API often needs separate configurations for its own port, API versioning, or logging settings.
74118

75-
Running API
119+
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.
120+
Running Sentrius
121+
1. Running the Core
76122

77-
Navigate to the api sub-project and run it using Maven:
123+
Navigate to the core sub-project:
78124

79-
$ cd api
80-
$ mvn spring-boot:run
125+
cd core
126+
mvn spring-boot:run
81127

82-
After running the core and api, the API server should be accessible via http://localhost:8080/api/v1/. The endpoints are defined in the api module to interact with the core module.
128+
Once the core service is running, it will initialize the necessary security policies, database migrations, and SSH session handling.
129+
2. Running the API
83130

84-
Usage
131+
In a separate terminal, navigate to the api sub-project:
85132

86-
Create an Enclave
133+
cd api
134+
mvn spring-boot:run
87135

88-
To create a new enclave, you can use the following API endpoint:
136+
The API will connect to the running core service and expose the REST endpoints (by default) at http://localhost:8080/api/v1/.
137+
Usage
89138

90-
POST /api/v1/enclaves
139+
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.
140+
1. Create an Enclave
91141

92-
Payload example:
142+
POST /api/v1/enclaves
143+
Content-Type: application/json
93144

94145
{
95146
"name": "Production Servers",
96147
"description": "Access group for production nodes"
97148
}
98149

99-
Adding Hosts to an Enclave
100-
101-
To add hosts to an enclave, use:
150+
2. Add a Host to an Enclave
102151

103152
POST /api/v1/enclaves/{enclaveId}/hosts
104-
105-
Payload example:
153+
Content-Type: application/json
106154

107155
{
108156
"host": "192.168.1.10",
109157
"username": "admin",
110158
"port": 22
111159
}
112160

113-
Establishing Secure Connections
114-
115-
Sentrius allows establishing secure SSH sessions with enforced policies using:
161+
3. Establish a Secure Connection
116162

117163
POST /api/v1/ssh/connect
118-
119-
Payload example:
164+
Content-Type: application/json
120165

121166
{
122167
"enclaveId": "12345",
123168
"hostId": "67890"
124169
}
125170

171+
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.
126172
API Documentation
127173

128-
API documentation is provided via Swagger. Once the api module is running, you can access the Swagger UI at:
174+
Sentrius uses Swagger for API documentation. Once the api module is running, browse to:
129175

130176
http://localhost:8080/swagger-ui.html
131177

132-
Contributing
178+
Here, you can explore all available endpoints, models, and request/response structures.
179+
For advanced use cases, consult the automatically generated openapi.json/openapi.yaml file.
180+
Deployment to Google Kubernetes Engine (GKE)
133181

134-
Feel free to submit issues, fork the repository, and make pull requests. Contributions are welcome to improve features, documentation, and to add more functionality.
182+
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.
135183

136-
License
184+
Build Docker Image (if needed)
185+
Make sure to build and tag your Docker image, then push it to a container registry accessible by GKE (e.g., Google Container Registry).
137186

138-
Sentrius is licensed under the MIT License. See the LICENSE file for more details.
187+
Configure GKE
188+
Ensure you are logged into your Google Cloud account and have set the correct context for your GKE cluster.
139189

140-
Contact
190+
Run the Helm Deployment Script
191+
From the project root (or from ops-scripts/gcp), run:
141192

142-
For support or questions, please contact the project maintainers at [email protected].
193+
./ops-scripts/gcp/deploy-helm.sh <helm-release-name> <gcp-project-id> <any-other-key-or-params>
143194

195+
<helm-release-name> is the name you want to assign to the Helm release in your cluster.
196+
<gcp-project-id> is your Google Cloud Platform project ID.
197+
You may supply additional parameters (keys, environment variables, or overrides) as needed.
144198

199+
This script will:
145200

146-
Deploying to EKS
201+
Deploy the required Kubernetes resources (Deployments, Services, etc.) for both core and api modules.
202+
Apply zero trust security rules configuration as specified.
203+
Expose the api service, typically via a LoadBalancer or an Ingress (depending on your Helm chart configuration).
147204

148-
```bash
149-
eksctl create cluster \
150-
--name sentrius-cluster \
151-
--region us-east-1 \
152-
--nodegroup-name sentrius-nodegroup \
153-
--nodes 2 \
154-
--nodes-min 1 \
155-
--nodes-max 3 \
156-
--managed \
157-
--tags tenant=multi-tenant,project=sentrius
158-
159-
160-
```
161-
162-
## Create customer namesapce
205+
Contributing
163206

164-
```bash
207+
Contributions of all forms are welcome! To get started:
165208

166-
kubectl create namespace sentrius-customer-1
209+
Fork the repository.
210+
Create a feature branch for your changes.
211+
Open a pull request back into the main branch, describing your changes and rationale.
167212

168-
```
213+
If you encounter any issues or have requests, feel free to open a GitHub Issue. We actively review and address bug reports, feature requests, and general improvements.
214+
License
169215

170-
### Attach policy to an iam role
216+
Sentrius is licensed under the MIT License. For more details, please see the LICENSE file.
217+
Contact
171218

172-
```bash
219+
Questions, feedback, or need commercial support? Reach out to the project maintainers:
173220

174-
eksctl create iamserviceaccount \
175-
--name sentrius-service-account \
176-
--namespace sentrius \
177-
--cluster sentrius-cluster \
178-
--attach-policy-arn arn:aws:iam::<account-id>:policy/secretsmanager-read-policy \
179-
--approve
180-
```
221+
181222

223+
We’re always happy to help you secure your infrastructure with Sentrius!

api/src/main/resources/templates/fragments/error.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
<div class="navbar navbar-light bg-light fixed-top navbar-expand-md" role="navigation">
1212
<div class="container">
1313
<div class="navbar-brand">
14-
<div class="nav-img">
15-
<img src="/img/bastillion_40x40.png" th:src="@{/img/bastillion_40x40.png}"
16-
alt="bastillion">
17-
</div>
1814
[[${systemOptions.systemLogoName}]]
1915
</div>
2016
<!--/.nav-collapse -->

api/src/main/resources/templates/sso/error.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
<div class="navbar navbar-light bg-light fixed-top navbar-expand-md" role="navigation">
1212
<div class="container">
1313
<div class="navbar-brand">
14-
<div class="nav-img">
15-
<img src="/img/bastillion_40x40.png" th:src="@{/img/bastillion_40x40.png}"
16-
alt="bastillion">
17-
</div>
1814
[[${systemOptions.systemLogoName}]]
1915
</div>
2016
<!--/.nav-collapse -->

0 commit comments

Comments
 (0)