-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UID2-3702 Add python config server to eks pipeline (#739)
* Add config server changes * Use custom branch for testing * Add scripts/aws/config-server/ * Install python3.11 and pip3 * Update requirements.txt path * Add debugging message for entrypoint.sh * Comment out everything in entrypoint for debugging * Update sockd conf external host name * Add scripts/aws/eks/pod/sockd_eks.conf * Install amazon-ec2-net-utils * Try out different ethnert pods * Add ip link show to debug * Add packages in Dockerfile * Install systemd-networkd * Start systemd before starting the enclave * Try eth0@if180 and debug with networkctl * Use eth0 for dante external * Add ec2-user as user * Add ec2-user user * cd into /home/config-server/ before running the flask server * Add flask app files * Provide config server the correct path * Provide config server correct path * Fix typo and provide the correct path for secret * Add .pyc files to gitignore * Remove unnecessary packages * Install net-tools to run ifconfig * Remove `EXPOSE 27015` * Remove aws-nitro-enclaves-cli-devel * Revert kcc-UID2-3702-config-server to main
- Loading branch information
1 parent
87c5b17
commit e4007e0
Showing
6 changed files
with
74 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from flask import Flask | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route('/getConfig', methods=['GET']) | ||
def get_config(): | ||
try: | ||
with open('/etc/secret/secret-value/config', 'r') as secret_file: | ||
secret_value = secret_file.read().strip() | ||
return secret_value | ||
except Exception as e: | ||
return str(e), 500 | ||
|
||
if __name__ == '__main__': | ||
app.run(processes=8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Flask==2.3.2 | ||
Werkzeug==3.0.3 | ||
setuptools==70.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
internal: 127.0.0.1 port = 3306 | ||
external: eth0 | ||
user.notprivileged: ec2-user | ||
clientmethod: none | ||
socksmethod: none | ||
|
||
client pass { | ||
from: 127.0.0.1/32 to: 127.0.0.1/32 | ||
log: error # connect disconnect iooperation | ||
} | ||
|
||
socks pass { | ||
from: 127.0.0.1/32 to: 0.0.0.0/0 | ||
command: bind connect | ||
protocol: tcp | ||
log: error | ||
} |