|
1 | 1 | Sentrius |
2 | 2 |
|
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 | + |
| 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: |
4 | 5 |
|
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. |
6 | 8 |
|
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 |
14 | 11 |
|
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 |
16 | 24 |
|
17 | | -Secure connection handling |
| 25 | +Key Features |
18 | 26 |
|
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. |
20 | 29 |
|
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. |
22 | 32 |
|
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). |
24 | 35 |
|
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. |
26 | 38 |
|
27 | | -Dynamic Rules Enforcement: Define and enforce zero trust rules at runtime, ensuring the security policies adapt to changing contexts. |
| 39 | +Project Structure |
28 | 40 |
|
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 | +└── ... |
30 | 68 |
|
31 | 69 | Prerequisites |
32 | 70 |
|
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 |
38 | 75 |
|
39 | 76 | Installation |
40 | 77 |
|
41 | | -Clone the Repository |
| 78 | + Clone the Repository |
42 | 79 |
|
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 |
45 | 82 |
|
46 | 83 | Build the Project |
47 | 84 |
|
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: |
49 | 86 |
|
50 | | -$ mvn clean install |
| 87 | + mvn clean install |
51 | 88 |
|
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. |
53 | 90 |
|
54 | 91 | Configuration |
55 | 92 |
|
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). |
57 | 94 |
|
58 | | -Configuration properties include: |
| 95 | +Typical settings include: |
59 | 96 |
|
60 | | -Database configuration |
| 97 | + Database Configuration |
61 | 98 |
|
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 |
63 | 103 |
|
64 | | -Security parameters for JWT or OAuth integration |
| 104 | +Security & Authentication |
65 | 105 |
|
66 | | -Running Sentrius |
| 106 | +# JWT or OAuth |
| 107 | +sentrius.security.jwt.secret=YOUR_SECRET_KEY |
| 108 | +sentrius.security.jwt.expiration=3600 |
67 | 109 |
|
68 | | -Running Core |
| 110 | +SSH Settings |
69 | 111 |
|
70 | | -Navigate to the core sub-project and run it using Maven: |
| 112 | + sentrius.ssh.port=22 |
| 113 | + sentrius.ssh.connection-timeout=30000 |
71 | 114 |
|
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. |
74 | 118 |
|
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 |
76 | 122 |
|
77 | | -Navigate to the api sub-project and run it using Maven: |
| 123 | +Navigate to the core sub-project: |
78 | 124 |
|
79 | | -$ cd api |
80 | | -$ mvn spring-boot:run |
| 125 | +cd core |
| 126 | +mvn spring-boot:run |
81 | 127 |
|
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 |
83 | 130 |
|
84 | | -Usage |
| 131 | +In a separate terminal, navigate to the api sub-project: |
85 | 132 |
|
86 | | -Create an Enclave |
| 133 | +cd api |
| 134 | +mvn spring-boot:run |
87 | 135 |
|
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 |
89 | 138 |
|
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 |
91 | 141 |
|
92 | | -Payload example: |
| 142 | +POST /api/v1/enclaves |
| 143 | +Content-Type: application/json |
93 | 144 |
|
94 | 145 | { |
95 | 146 | "name": "Production Servers", |
96 | 147 | "description": "Access group for production nodes" |
97 | 148 | } |
98 | 149 |
|
99 | | -Adding Hosts to an Enclave |
100 | | - |
101 | | -To add hosts to an enclave, use: |
| 150 | +2. Add a Host to an Enclave |
102 | 151 |
|
103 | 152 | POST /api/v1/enclaves/{enclaveId}/hosts |
104 | | - |
105 | | -Payload example: |
| 153 | +Content-Type: application/json |
106 | 154 |
|
107 | 155 | { |
108 | 156 | "host": "192.168.1.10", |
109 | 157 | "username": "admin", |
110 | 158 | "port": 22 |
111 | 159 | } |
112 | 160 |
|
113 | | -Establishing Secure Connections |
114 | | - |
115 | | -Sentrius allows establishing secure SSH sessions with enforced policies using: |
| 161 | +3. Establish a Secure Connection |
116 | 162 |
|
117 | 163 | POST /api/v1/ssh/connect |
118 | | - |
119 | | -Payload example: |
| 164 | +Content-Type: application/json |
120 | 165 |
|
121 | 166 | { |
122 | 167 | "enclaveId": "12345", |
123 | 168 | "hostId": "67890" |
124 | 169 | } |
125 | 170 |
|
| 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. |
126 | 172 | API Documentation |
127 | 173 |
|
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: |
129 | 175 |
|
130 | 176 | http://localhost:8080/swagger-ui.html |
131 | 177 |
|
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) |
133 | 181 |
|
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. |
135 | 183 |
|
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). |
137 | 186 |
|
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. |
139 | 189 |
|
140 | | -Contact |
| 190 | + Run the Helm Deployment Script |
| 191 | + From the project root (or from ops-scripts/gcp), run: |
141 | 192 |
|
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> |
143 | 194 |
|
| 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. |
144 | 198 |
|
| 199 | +This script will: |
145 | 200 |
|
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). |
147 | 204 |
|
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 |
163 | 206 |
|
164 | | -```bash |
| 207 | +Contributions of all forms are welcome! To get started: |
165 | 208 |
|
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. |
167 | 212 |
|
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 |
169 | 215 |
|
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 |
171 | 218 |
|
172 | | -```bash |
| 219 | +Questions, feedback, or need commercial support? Reach out to the project maintainers: |
173 | 220 |
|
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 | + |
181 | 222 |
|
| 223 | +We’re always happy to help you secure your infrastructure with Sentrius! |
0 commit comments