Skip to content

Commit 8690b44

Browse files
authored
Added non-standard API endpoint for PAM events (#15)
1 parent cb85a7a commit 8690b44

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

src/ES.SFTP.Host/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN apt-get update && \
1919
# - Remove default host keys
2020
rm -f /etc/ssh/ssh_host_*key*
2121
WORKDIR /app
22-
EXPOSE 22 80
22+
EXPOSE 22 25080
2323

2424
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
2525
WORKDIR /src

src/ES.SFTP.Host/ES.SFTP.Host.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
66
<DockerfileTag>emberstack/sftp:dev</DockerfileTag>
77
<DockerfileRunArguments>-p 2222:22 --name sftpdev</DockerfileRunArguments>

src/ES.SFTP.Host/Orchestrator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private async Task ConfigureAuthentication()
100100
var eventsScriptBuilder = new StringBuilder();
101101
eventsScriptBuilder.AppendLine("#!/bin/sh");
102102
eventsScriptBuilder.AppendLine(
103-
"curl \"http://localhost/api/events/pam/generic?username=$PAM_USER&type=$PAM_TYPE&service=$PAM_SERVICE\"");
103+
"curl \"http://localhost:25080/api/events/pam/generic?username=$PAM_USER&type=$PAM_TYPE&service=$PAM_SERVICE\"");
104104
await File.WriteAllTextAsync(hookScriptFile, eventsScriptBuilder.ToString());
105105
await ProcessUtil.QuickRun("chown", $"root:root \"{hookScriptFile}\"");
106106
await ProcessUtil.QuickRun("chmod", $"+x \"{hookScriptFile}\"");
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,2 @@
11
{
2-
"Logging": {
3-
"LogLevel": {
4-
"Default": "Debug",
5-
"System": "Information",
6-
"Microsoft": "Information"
7-
}
8-
}
92
}

src/ES.SFTP.Host/appsettings.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
{
2-
"AllowedHosts": "*"
2+
"AllowedHosts": "*",
3+
"Kestrel": {
4+
"EndPoints": {
5+
"Http": {
6+
"Url": "http://0.0.0.0:25080"
7+
}
8+
}
9+
}
310
}

0 commit comments

Comments
 (0)