diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 8fffaf9d..97591a01 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -38,16 +38,21 @@ jobs:
sudo mkdir -p /tmp/trasa/accessproxy/ssh
sudo chmod 777 /tmp/trasa/accessproxy/ssh
+
+ - name: Go get
+ working-directory: ./server
+ run: go get -v ./...
+
- name: Unit Test
- working-directory: ./tests
- run: make unit-test
+ working-directory: ./server
+ run: go test -v ./...
- name: Integration Test
working-directory: ./tests
- run: make integration-test
+ run: cd build/integration && docker-compose up --build -d && cd ../.. && go test -v ./server
- name: Clean
- working-directory: ./tests
- run: make clear
+ working-directory: ./tests/build/integration
+ run: docker-compose down
diff --git a/.gitignore b/.gitignore
index 887ef370..8e325c45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,8 @@
trasa-server
server/server
+devenv/
+
.vscode/
.idea/
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..66a59b08
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+.PHONY: dependency unit-test integration-test docker-up-all docker-down-all docker-up-db docker-down-db clear
+
+
+dev-setup:
+ @mkdir -p devenv/var/log && cp -r build/etc devenv/ && touch devenv/var/log/trasa.log
+
+dev-run:
+ @cd build/docker && docker-compose up --build
+
+clear:
+ @cd build/docker && docker-compose down
diff --git a/build/docker/dev/Dockerfile b/build/docker/dev/Dockerfile
index d21ce975..3a8d8afe 100644
--- a/build/docker/dev/Dockerfile
+++ b/build/docker/dev/Dockerfile
@@ -30,11 +30,13 @@ RUN yarn run build
FROM ubuntu:xenial-20200706
WORKDIR /trasa
+ENV GUACENC_INSTALLED=true
RUN apt-get update
RUN apt-get install -y --no-install-recommends ca-certificates
RUN update-ca-certificates
COPY --from=gobuilder /go/src/seknox/trasa/server/server .
COPY --from=dashbuilder /trasa/build /var/trasa/dashboard
+COPY --from=seknox/guacd:v0.0.1 /usr/local/guacamole/bin/guacenc /usr/local/guacamole/bin/guacenc
COPY build/etc/trasa /etc/trasa
COPY build/docker/wait-for-it.sh .
CMD ["/trasa/wait-for-it.sh","db:5432", "--","/trasa/server"]
diff --git a/dashboard/src/pages/Control/policies/newCreatePolicy.tsx b/dashboard/src/pages/Control/policies/newCreatePolicy.tsx
index e8a484de..17425399 100644
--- a/dashboard/src/pages/Control/policies/newCreatePolicy.tsx
+++ b/dashboard/src/pages/Control/policies/newCreatePolicy.tsx
@@ -630,7 +630,7 @@ function PolicyTab(props: any) {
aria-label="styled tabs example"
>
-
+
-
+
{/* Basic Policy */}
diff --git a/dashboard/src/pages/Providers/CryptoOps/CertificateAuthority/index.tsx b/dashboard/src/pages/Providers/CryptoOps/CertificateAuthority/index.tsx
index b2c75e32..b494c46e 100644
--- a/dashboard/src/pages/Providers/CryptoOps/CertificateAuthority/index.tsx
+++ b/dashboard/src/pages/Providers/CryptoOps/CertificateAuthority/index.tsx
@@ -130,7 +130,7 @@ export default function CA(props: any) {
const generateSSHCA = (type: any) => () => {
axios
- .post(`${Constants.TRASA_HOSTNAME}/api/v1/system/sshca/init/${type}`)
+ .post(`${Constants.TRASA_HOSTNAME}/api/v1/providers/ca/tsxca/ssh/init/${type}`)
.then((response) => {});
};
@@ -336,7 +336,7 @@ function CATable(props: any) {
const downloadCA = (name: any, type: any) => () => {
switch (type) {
case 'SSH_CA':
- axios.get(`${Constants.TRASA_HOSTNAME}/api/v1/system/ca/ssh/${name}`).then((response) => {
+ axios.get(`${Constants.TRASA_HOSTNAME}/api/v1/providers/ca/tsxca/ssh/${name}`).then((response) => {
fileDownload(response.data, 'ca-cert.pem', 'application/x-pem-file');
});
break;
diff --git a/dashboard/src/pages/Services/Service/Settings/ServiceSetting.tsx b/dashboard/src/pages/Services/Service/Settings/ServiceSetting.tsx
index 4eb0fd7e..0d717a85 100644
--- a/dashboard/src/pages/Services/Service/Settings/ServiceSetting.tsx
+++ b/dashboard/src/pages/Services/Service/Settings/ServiceSetting.tsx
@@ -271,7 +271,7 @@ export default function Servicesetting(props: ServicesettingProps) {
SSH