Skip to content

Make several security updates for ec2 based deployments - #199

Open
bjsvedin wants to merge 1 commit into
version-5.3from
ec2-deploy-security-items
Open

bjsvedin wants to merge 1 commit into
version-5.3from
ec2-deploy-security-items

Conversation

@bjsvedin

Copy link
Copy Markdown
Contributor

Run as non-privileged user
Option for Systemd sandboxing
Option for settings are encrypted at rest, and decrypt at runtime, just like lambda deployment do
Also updated the structure of the deployment to separate the code from the configs and the working directory.

Also the java version is now configurable.

Run as non-privileged user
Option for Systemd sandboxing
Option for settings are encrypted at rest, and decrypt at runtime,
just like lambda deployment do
Also updated the structure of the deployment to separate the code from
the configs and the working directory.
public open val additionalPackages: List<String> = emptyList()

public enum class JavaVersion {
`8`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ugh if you insist

* Caveat: if required settings are missing, `loadFromFile` writes `settings.suggested.json` with the
* decrypted values into the working directory, putting them on disk in plaintext.
*/
public open val encryptSettingsAtRest: Boolean get() = false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why make this optional?

protected fun StringBuilder.systemD() {
// An unprivileged user cannot bind below 1024; grant exactly that capability when needed.
val bindsPrivilegedPort = appPort < 1024
val capabilities = if (bindsPrivilegedPort) "AmbientCapabilities=CAP_NET_BIND_SERVICE" else ""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we just outright disallow using the privileged port for the app server?
should the app server port even be configurable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants