Skip to content
Open

v1.0 #12

Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions microsoft-365-dke/.devcontainer/build.sh

This file was deleted.

56 changes: 0 additions & 56 deletions microsoft-365-dke/.devcontainer/data/start.sh

This file was deleted.

7 changes: 0 additions & 7 deletions microsoft-365-dke/.devcontainer/env

This file was deleted.

27 changes: 0 additions & 27 deletions microsoft-365-dke/.devcontainer/privkeynopass.pem

This file was deleted.

Binary file removed microsoft-365-dke/.devcontainer/pubkeyonly.pem
Binary file not shown.
14 changes: 0 additions & 14 deletions microsoft-365-dke/.devcontainer/run.sh

This file was deleted.

4 changes: 2 additions & 2 deletions microsoft-365-dke/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/customer-key-store/bin/Debug/netcoreapp3.1/customerkeystore.dll",
"program": "${workspaceFolder}/src/unbound-key-store/bin/Debug/netcoreapp3.1/unboundkeystore.dll",
"args": [],
"cwd": "${workspaceFolder}/src/customer-key-store",
"cwd": "${workspaceFolder}/src/unbound-key-store",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
Expand Down
6 changes: 3 additions & 3 deletions microsoft-365-dke/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/customer-key-store/customerkeystore.csproj",
"${workspaceFolder}/src/unbound-key-store/unboundkeystore.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -19,7 +19,7 @@
"type": "process",
"args": [
"publish",
"${workspaceFolder}/src/customer-key-store/customerkeystore.csproj",
"${workspaceFolder}/src/unbound-key-store/unboundkeystore.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -32,7 +32,7 @@
"args": [
"watch",
"run",
"${workspaceFolder}/src/customer-key-store/customerkeystore.csproj",
"${workspaceFolder}/src/unbound-key-store/unboundkeystore.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand Down
4 changes: 1 addition & 3 deletions microsoft-365-dke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ Repeat these steps, but this time, define the client ID as c00e9d32-3c8d-4a7d-83

# Build the project

1. goto : /src/customer-key-store/Models/TestStore.cs Line 17,18
replace ukcKeyName="<key_name>";
ukcKeyUid="<key_uid>";

3. open appsettings.json file
a. Locate the ValidIssuers setting and replace <tenant_ID> with your tenant ID. You can locate your tenant ID by going to the Azure portal and viewing the tenant properties. for example "https://sts.windows.net/<tenant_ID>/"
b. Locate the JwtAudience setting and replace <yourhostname> with the hostname of the machine where the DKE service will run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,19 @@ RUN curl -LO# https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
mv jq /usr/bin

RUN mkdir /root/data
COPY data /root/data
COPY . /root/data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you cancel the /data folder and moved all scripts to the main folder ?
This will copy Dockerfile and build.sh also into the /data folder in the container which is not needed


ARG UKC_CLIENT_INSTALLER_URL
RUN echo "Downloading UKC client install file: $UKC_CLIENT_INSTALLER_URL";

RUN sudo apt install /root/data/ekm-client_2.0.2010.38476.deb9_amd64.deb; \
rm $(basename /root/data/ekm-client_2.0.2010.38476.deb9_amd64.deb); \
RUN echo "Downloading ${UKC_CLIENT_INSTALLER_URL}"; \
curl -O# "${UKC_CLIENT_INSTALLER_URL}"; \
echo "Installing $(basename ${UKC_CLIENT_INSTALLER_URL})"; \
sudo apt install $(basename "${UKC_CLIENT_INSTALLER_URL}"); \
rm $(basename "${UKC_CLIENT_INSTALLER_URL}"); \
echo "UKC Client Installed successfully"

RUN chmod +x /root/data/*.sh;

#RUN mkdir /root/demo
#COPY ./src /root/demo/



RUN chmod +x /root/data/*.sh;

######################################

Expand All @@ -55,23 +53,12 @@ RUN apt-get update \

COPY sshd_config /etc/ssh/


#COPY netcoreapp3.1 /root/data
RUN mkdir /root/data/published
COPY publish /root/data/published

ENV PORT 8080

EXPOSE 2222 8080

ENV ASPNETCORE_URLS "http://*:${PORT}"

#ENTRYPOINT ["dotnet", "/root/data/published/customerkeystore.dll"]
#ENTRYPOINT ["/bin/bash", "/root/data/start_test.sh"]
CMD "/root/data/start_for_container.sh"
#CMD ["bash"]

#ENTRYPOINT ["tail", "-f", "/dev/null"]
#ENTRYPOINT ["/root/data/start_for_container.sh"]
CMD "/root/data/start.sh"


9 changes: 9 additions & 0 deletions microsoft-365-dke/docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

install_url="https://repo.dyadicsec.local/cust/autotest/ekm/2.0.2103.39708/linux/ekm-client_2.0.2103.39708.deb9_amd64.deb"
tag="unboundukc/ms-dke-service:latest"

docker build -t $tag --no-cache \
--build-arg UKC_CLIENT_INSTALLER_URL=$install_url \
$(dirname "$0")

Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
#!/bin/bash
# This script is used in the postCreateCommand of the Visual Studio Code Dev Container
set -x

export PORT=8080

export ASPNETCORE_URLS=http://*:$PORT

# configure env params
# export EP_HOST_NAME="ep1"
# export UKC_PARTITION="test"
# export UKC_SO_PASSWORD="Unbound1!"
# export UKC_PASSWORD="Unbound1!"
# export UKC_SERVER_IP="54.174.121.27"

echo "servers=$EP_HOST_NAME">/etc/ekm/client.conf

echo "$UKC_SERVER_IP ep1" >> /etc/hosts
Expand All @@ -24,10 +16,8 @@ sh /root/data/create_partition.sh
# Register UKC client - establish secure connection with PKCS11
#sh /root/data/register_new_client_ephemeral.sh
sh /root/data/register_new_client.sh
cd /root/data/published
cd /root/data/publish

service ssh start

dotnet customerkeystore.dll

#tail -f /dev/null #keep container running
dotnet unboundkeystore.dll
Loading