-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CommVault - An Open Source Password Management Tool (#1)
* Added modules and project configuration * devops: Added Dockerfile and Compose configurations * feat: Created project template * devops: Use redis-stack-server container for Redis for both dev/prod * feat: Integrated Jedis and OM with cache management via Redis * devops: Added GitHub Actions workflow for Maven CI * gha: Removed action for Maven Dependency Submission
- Loading branch information
1 parent
e43e223
commit 2b5adc9
Showing
58 changed files
with
2,895 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: CommVault - CI Build | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build-commvault-modules: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
architecture: x64 | ||
cache: maven | ||
|
||
- name: Build CommVault | ||
run: mvn -B clean package -DskipTests --file commvault-accounts/pom.xml | ||
|
||
- name: Build CommVault ConfigServer | ||
run: mvn -B clean package -DskipTests --file commvault-configserver/pom.xml | ||
|
||
- name: Build CommVault Service Discovery | ||
run: mvn -B clean package -DskipTests --file commvault-serviceregistry/pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
# CommVault | ||
|
||
Enterprise Password Comm Vault | ||
|
||
## Setup Local | ||
|
||
#### redis/redis-stack | ||
|
||
```sh | ||
docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 --restart unless-stopped -e REDIS_ARGS="--requirepass admin --protected-mode yes --save 60 1000 --appendonly yes --loglevel warning" -e REDISTIMESERIES_ARGS="RETENTION_POLICY=20" redis/redis-stack:6.2.6-v17 | ||
``` | ||
|
||
#### redis/redis-stack-server | ||
|
||
```sh | ||
docker run -d --name redis-stack-server -p 6379:6379 --restart unless-stopped -e REDIS_ARGS="--requirepass admin --protected-mode yes --save 60 1000 --appendonly yes --loglevel warning" -e REDISTIMESERIES_ARGS="RETENTION_POLICY=20" redis/redis-stack-server:6.2.6-v17 | ||
``` |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.shortthirdman.commvault</groupId> | ||
<artifactId>commvault-accounts-schema</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>commvault-accounts-schema</name> | ||
<description>CommVault Accounts Schema</description> | ||
<url>https://github.com/shortthirdman-org/CommVault</url> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<protobuf-java.version>4.29.0</protobuf-java.version> | ||
<protobuff-compiler.version>3.8.0</protobuff-compiler.version> | ||
<maven.compiler.source>21</maven.compiler.source> | ||
<maven.compiler.target>21</maven.compiler.target> | ||
<maven.compiler.release>21</maven.compiler.release> | ||
|
||
<generated.sourceDirectory></generated.sourceDirectory> | ||
<proto.files>${project.build.sourceDirectory}/com/shortthirdman/commvault/schema/*.proto</proto.files> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.protobuf</groupId> | ||
<artifactId>protobuf-java</artifactId> | ||
<version>${protobuf-java.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.protobuf</groupId> | ||
<artifactId>protoc</artifactId> | ||
<version>${protobuff-compiler.version}</version> | ||
<type>pom</type> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<sourceDirectory>${project.basedir}/src/main/proto</sourceDirectory> | ||
<testSourceDirectory>${project.basedir}/src/test/proto</testSourceDirectory> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.google.protobuf.tools</groupId> | ||
<artifactId>maven-protoc-plugin</artifactId> | ||
<version>0.0.1</version> | ||
<executions> | ||
<execution> | ||
<id>generate-sources</id> | ||
<goals> | ||
<goal>compile</goal> | ||
</goals> | ||
<phase>generate-sources</phase> | ||
<configuration> | ||
<protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot> | ||
<includes> | ||
<param>**/*.proto</param> | ||
</includes> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<protocExecutable>/usr/local/bin/protoc</protocExecutable> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>compile-protoc</id> | ||
<phase>generate-sources</phase> | ||
<configuration> | ||
<tasks> | ||
<mkdir dir="${generated.sourceDirectory}" /> | ||
<path id="proto.path"> | ||
<fileset dir="src/main/proto"> | ||
<include name="**/*.proto" /> | ||
</fileset> | ||
</path> | ||
<pathconvert pathsep=" " property="proto.files" refid="proto.path" /> | ||
<exec executable="protoc" failonerror="true"> | ||
<arg value="--java_out=${generated.sourceDirectory}" /> | ||
<arg value="-I${project.basedir}/src/main/proto" /> | ||
<arg line="${proto.files}" /> | ||
</exec> | ||
</tasks> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>3.4.2</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>2.1.2</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
</project> |
36 changes: 36 additions & 0 deletions
36
commvault-accounts-schema/src/main/proto/com/shortthirdman/commvault/schema/account.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
syntax = "proto3"; | ||
|
||
package com.shortthirdman.commvault.schema; | ||
|
||
import "google/protobuf/any.proto"; | ||
import "google/protobuf/type.proto"; | ||
import "google/protobuf/empty.proto"; | ||
import "google/protobuf/descriptor.proto"; | ||
|
||
option java_multiple_files = true; | ||
option java_package = "com.shortthirdman.commvault.schema"; | ||
|
||
enum AccountType { | ||
PERSONAL = 0; | ||
WORK = 1; | ||
PROFESSIONAL = 2; | ||
} | ||
|
||
message Account { | ||
int64 id = 1; | ||
string org_id = 2; | ||
string org_name = 3; | ||
string user_name = 4; | ||
string email_address = 5; | ||
string password = 6; | ||
bool active = 7; | ||
AccountType account_type = 8; | ||
map<string, string> meta_data = 9; | ||
string created_at = 10; | ||
string updated_at = 11; | ||
} | ||
|
||
message Accounts { | ||
int64 id = 1; | ||
repeated Account accounts = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/mvnw text eol=lf | ||
*.cmd text eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
HELP.md | ||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### VS Code ### | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
wrapperVersion=3.3.2 | ||
distributionType=only-script | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Getting Started | ||
|
||
### Reference Documentation | ||
For further reference, please consider the following sections: | ||
|
||
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html) | ||
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/3.3.7/maven-plugin) | ||
* [Create an OCI image](https://docs.spring.io/spring-boot/3.3.7/maven-plugin/build-image.html) | ||
* [Spring Boot DevTools](https://docs.spring.io/spring-boot/3.3.7/reference/using/devtools.html) | ||
* [Spring Configuration Processor](https://docs.spring.io/spring-boot/3.3.7/specification/configuration-metadata/annotation-processor.html) | ||
* [Docker Compose Support](https://docs.spring.io/spring-boot/3.3.7/reference/features/dev-services.html#features.dev-services.docker-compose) | ||
* [Spring Web](https://docs.spring.io/spring-boot/3.3.7/reference/web/servlet.html) | ||
* [Spring Security](https://docs.spring.io/spring-boot/3.3.7/reference/web/spring-security.html) | ||
* [Spring Data Redis (Access+Driver)](https://docs.spring.io/spring-boot/3.3.7/reference/data/nosql.html#data.nosql.redis) | ||
* [Spring Data Reactive Redis](https://docs.spring.io/spring-boot/3.3.7/reference/data/nosql.html#data.nosql.redis) | ||
* [Java Mail Sender](https://docs.spring.io/spring-boot/3.3.7/reference/io/email.html) | ||
* [Quartz Scheduler](https://docs.spring.io/spring-boot/3.3.7/reference/io/quartz.html) | ||
* [Spring Boot Actuator](https://docs.spring.io/spring-boot/3.3.7/reference/actuator/index.html) | ||
* [Config Client](https://docs.spring.io/spring-cloud-config/reference/client.html) | ||
* [Eureka Discovery Client](https://docs.spring.io/spring-cloud-netflix/reference/spring-cloud-netflix.html#_service_discovery_eureka_clients) | ||
|
||
### Guides | ||
The following guides illustrate how to use some features concretely: | ||
|
||
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) | ||
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) | ||
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/) | ||
* [Securing a Web Application](https://spring.io/guides/gs/securing-web/) | ||
* [Spring Boot and OAuth2](https://spring.io/guides/tutorials/spring-boot-oauth2/) | ||
* [Authenticating a User with LDAP](https://spring.io/guides/gs/authenticating-ldap/) | ||
* [Messaging with Redis](https://spring.io/guides/gs/messaging-redis/) | ||
* [Messaging with Redis](https://spring.io/guides/gs/messaging-redis/) | ||
* [Building a RESTful Web Service with Spring Boot Actuator](https://spring.io/guides/gs/actuator-service/) | ||
* [Service Registration and Discovery with Eureka and Spring Cloud](https://spring.io/guides/gs/service-registration-and-discovery/) | ||
|
||
### Docker Compose support | ||
This project contains a Docker Compose file named `compose.yaml`. | ||
In this file, the following services have been defined: | ||
|
||
* redis: [`redis:latest`](https://hub.docker.com/_/redis) | ||
|
||
Please review the tags of the used images and set them to the same as you're running in production. | ||
|
||
### Maven Parent overrides | ||
|
||
Due to Maven's design, elements are inherited from the parent POM to the project POM. | ||
While most of the inheritance is fine, it also inherits unwanted elements like `<license>` and `<developers>` from the parent. | ||
To prevent this, the project POM contains empty overrides for these elements. | ||
If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides. | ||
|
Oops, something went wrong.