mirror of
https://github.com/trailofbits/algo.git
synced 2025-08-15 17:23:07 +02:00
Merge 47da4c0891
into efc8dc7620
This commit is contained in:
commit
f9c1ca77c2
4 changed files with 19 additions and 10 deletions
|
@ -21,7 +21,7 @@ Resources:
|
||||||
InstanceTenancy: default
|
InstanceTenancy: default
|
||||||
Tags:
|
Tags:
|
||||||
- Key: Name
|
- Key: Name
|
||||||
Value: Algo
|
Value: !Ref AWS::StackName
|
||||||
- Key: Environment
|
- Key: Environment
|
||||||
Value: Algo
|
Value: Algo
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ Resources:
|
||||||
- Key: Environment
|
- Key: Environment
|
||||||
Value: Algo
|
Value: Algo
|
||||||
- Key: Name
|
- Key: Name
|
||||||
Value: Algo
|
Value: !Ref AWS::StackName
|
||||||
|
|
||||||
Subnet:
|
Subnet:
|
||||||
Type: AWS::EC2::Subnet
|
Type: AWS::EC2::Subnet
|
||||||
|
@ -49,7 +49,7 @@ Resources:
|
||||||
- Key: Environment
|
- Key: Environment
|
||||||
Value: Algo
|
Value: Algo
|
||||||
- Key: Name
|
- Key: Name
|
||||||
Value: Algo
|
Value: !Ref AWS::StackName
|
||||||
VpcId: !Ref VPC
|
VpcId: !Ref VPC
|
||||||
|
|
||||||
VPCGatewayAttachment:
|
VPCGatewayAttachment:
|
||||||
|
@ -66,7 +66,7 @@ Resources:
|
||||||
- Key: Environment
|
- Key: Environment
|
||||||
Value: Algo
|
Value: Algo
|
||||||
- Key: Name
|
- Key: Name
|
||||||
Value: Algo
|
Value: !Ref AWS::StackName
|
||||||
|
|
||||||
Route:
|
Route:
|
||||||
Type: AWS::EC2::Route
|
Type: AWS::EC2::Route
|
||||||
|
@ -140,7 +140,7 @@ Resources:
|
||||||
CidrIp: 0.0.0.0/0
|
CidrIp: 0.0.0.0/0
|
||||||
Tags:
|
Tags:
|
||||||
- Key: Name
|
- Key: Name
|
||||||
Value: Algo
|
Value: !Ref AWS::StackName
|
||||||
- Key: Environment
|
- Key: Environment
|
||||||
Value: Algo
|
Value: Algo
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ Resources:
|
||||||
cfn-signal -e $? --stack ${AWS::StackName} --resource EC2Instance --region ${AWS::Region}
|
cfn-signal -e $? --stack ${AWS::StackName} --resource EC2Instance --region ${AWS::Region}
|
||||||
Tags:
|
Tags:
|
||||||
- Key: Name
|
- Key: Name
|
||||||
Value: Algo
|
Value: !Ref AWS::StackName
|
||||||
- Key: Environment
|
- Key: Environment
|
||||||
Value: Algo
|
Value: Algo
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
---
|
|
||||||
- name: Deploy the template
|
- name: Deploy the template
|
||||||
cloudformation:
|
cloudformation:
|
||||||
aws_access_key: "{{ access_key }}"
|
aws_access_key: "{{ access_key }}"
|
||||||
|
|
|
@ -79,7 +79,12 @@ Save the embedded CA cert and encrypted user PKCS12 file.
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
$VpnServerAddress = "{{ IP_subject_alt_name }}"
|
$VpnServerAddress = "{{ IP_subject_alt_name }}"
|
||||||
$VpnName = "Algo VPN {{ IP_subject_alt_name }} IKEv2"
|
{% if (algo_server_name == 'algo') or (algo_server_name == 'algo.local') %}
|
||||||
|
{% set vpn_server_name = 'Algo VPN '+IP_subject_alt_name+' IKEv2' %}
|
||||||
|
{% else %}
|
||||||
|
{% set vpn_server_name = algo_server_name+' VPN' %}
|
||||||
|
{% endif %}
|
||||||
|
$VpnName = "{{ vpn_server_name }}"
|
||||||
$VpnUser = "{{ item.0 }}"
|
$VpnUser = "{{ item.0 }}"
|
||||||
$CaCertificateBase64 = "{{ PayloadContentCA }}"
|
$CaCertificateBase64 = "{{ PayloadContentCA }}"
|
||||||
$UserPkcs12Base64 = "{{ item.1.stdout }}"
|
$UserPkcs12Base64 = "{{ item.1.stdout }}"
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
{% if (algo_server_name == 'algo') or (algo_server_name == 'algo.local') %}
|
||||||
|
{% set vpn_server_name = 'Algo VPN '+IP_subject_alt_name+' IKEv2' %}
|
||||||
|
{% else %}
|
||||||
|
{% set vpn_server_name = algo_server_name+' VPN' %}
|
||||||
|
{% endif %}
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
|
@ -129,7 +134,7 @@
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>UserDefinedName</key>
|
<key>UserDefinedName</key>
|
||||||
<string>Algo VPN {{ IP_subject_alt_name }} IKEv2</string>
|
<string>{{ vpn_server_name }}</string>
|
||||||
<key>VPNType</key>
|
<key>VPNType</key>
|
||||||
<string>IKEv2</string>
|
<string>IKEv2</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
@ -175,7 +180,7 @@
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>PayloadDisplayName</key>
|
<key>PayloadDisplayName</key>
|
||||||
<string>{{ IP_subject_alt_name }} IKEv2</string>
|
<string>{{ vpn_server_name }}</string>
|
||||||
<key>PayloadIdentifier</key>
|
<key>PayloadIdentifier</key>
|
||||||
<string>donut.local.{{ 500000 | random | to_uuid | upper }}</string>
|
<string>donut.local.{{ 500000 | random | to_uuid | upper }}</string>
|
||||||
<key>PayloadRemovalDisallowed</key>
|
<key>PayloadRemovalDisallowed</key>
|
||||||
|
|
Loading…
Add table
Reference in a new issue