cloudx-proxy 0.4.7__tar.gz → 0.4.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. cloudx_proxy-0.4.8/.clinerules +103 -0
  2. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/CHANGELOG.md +2 -0
  3. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/PKG-INFO +7 -1
  4. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/README.md +6 -0
  5. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy/_version.py +2 -2
  6. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy.egg-info/PKG-INFO +7 -1
  7. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy.egg-info/SOURCES.txt +1 -0
  8. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/.github/workflows/release.yml +0 -0
  9. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/.gitignore +0 -0
  10. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/.releaserc +0 -0
  11. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/CONTRIBUTING.md +0 -0
  12. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/LICENSE +0 -0
  13. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy/_1password.py +0 -0
  14. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy/__init__.py +0 -0
  15. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy/cli.py +0 -0
  16. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy/core.py +0 -0
  17. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy/setup.py +0 -0
  18. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy.egg-info/dependency_links.txt +0 -0
  19. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy.egg-info/entry_points.txt +0 -0
  20. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy.egg-info/requires.txt +0 -0
  21. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/cloudx_proxy.egg-info/top_level.txt +0 -0
  22. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/package.json +0 -0
  23. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/pyproject.toml +0 -0
  24. {cloudx_proxy-0.4.7 → cloudx_proxy-0.4.8}/setup.cfg +0 -0
@@ -0,0 +1,103 @@
1
+ # cloudX-proxy
2
+
3
+ CloudX is a development environment consisting of
4
+
5
+ - a local VSCode installation
6
+ - a remote development server (EC2 instance) running with auto-shutdown
7
+
8
+ The AWS side consists of the following components:
9
+
10
+ - an CloudX-environment
11
+ - a CloudX-user
12
+ - a CloudX-instance
13
+
14
+ The CloudX-environment is a set of resources that are used to run the CloudX-instance.
15
+ Most importantly, it defines the VPC subnet where the instances are launched.
16
+
17
+ A CloudX-user is an IAM user with the necessary permissions to manage their CloudX-instance(s) based on a ABAC tag defined in the cloudX-environment.
18
+
19
+ A CloudX-instance is an EC2 instance that is launched in the CloudX-environment.
20
+ It's most important feature is that it is automatically stopped after a certain period of inactivity.
21
+
22
+ The AWS components are deployed from AWS Service Catalog.
23
+
24
+ The cloudX-proxy is a tool that allows you to access the remote development server from your local VSCode installation over an ssh connection established by the cloudX-proxy. The cloudX-proxy takes care of starting the instance should it be stopped. Also, it pushes an ssh key to the instance to allow you to connect to it. Given that the proxy uses AWS Systems Manager to initiate the connection, you don't need to open any inbound ports in the security group of the instance.
25
+
26
+ ## Architecture
27
+
28
+ ### SSH Configuration Structure
29
+
30
+ CloudX-proxy uses a hierarchical three-tier SSH configuration approach:
31
+
32
+ 1. **Generic Configuration (cloudx-*)**: Common settings for all environments
33
+ - User settings (ec2-user)
34
+ - TCP keepalive
35
+ - SSH multiplexing configuration
36
+
37
+ 2. **Environment Configuration (cloudx-{env}-*)**: Environment-specific settings
38
+ - Authentication configuration (identity settings)
39
+ - ProxyCommand with environment-specific parameters
40
+
41
+ 3. **Host Configuration (cloudx-{env}-hostname)**: Instance-specific settings
42
+ - HostName (instance ID)
43
+ - Optional overrides for incompatible settings
44
+
45
+ This tiered approach minimizes configuration duplication and makes it clear which settings apply broadly and which are specific to an environment or host.
46
+
47
+ ### Security Model
48
+
49
+ The primary security boundary is enforced through AWS IAM via Systems Manager (SSM) and EC2 Instance Connect:
50
+ - Only authenticated AWS users with appropriate IAM permissions can establish SSM sessions
51
+ - EC2 Instance Connect allows temporary injection of SSH public keys
52
+ - No inbound SSH ports need to be exposed, as all connections are through AWS SSM's secure tunneling
53
+ - All connection attempts and key pushes are logged in AWS CloudTrail
54
+
55
+ ## Operating Modes
56
+
57
+ CloudX-proxy runs in either of two modes:
58
+
59
+ - setup
60
+ - connect
61
+
62
+ ### Setup Mode
63
+
64
+ With setup mode, the config files and directories for the connect mode are established. The setup mode is typically only run once per CloudX-instance. When running setup, the user is asked for their AWS AK/SK of the IAM user created as CloudX-user. This will be stored in ~/.aws/credentials. Alternatively the user can store this data themselves in ~/.aws/credentials. The profile name is 'vscode' by default, but can be overruled with the --profile option. When multiple instances are used, it is recommended to use a profile cloudx-env-user where env is the environment and user the username.
65
+
66
+ By default an ssh key named vscode will be used - and created if not available in the configuration directory (~/.ssh/vscode). The user can specify a different key with the --ssh-key option.
67
+
68
+ A 'Host cloudx-{env}-*' entry will be created in the ~/.ssh/vscode/config file for each environment. A user can potentially have multiple instances in a single environment as well as multiple environments.
69
+
70
+ #### Setup Options
71
+
72
+ - **--profile**: AWS profile to use (default: 'vscode')
73
+ - **--ssh-key**: SSH key name to use (default: 'vscode')
74
+ - **--ssh-config**: SSH config file to use (default: ~/.ssh/vscode/config)
75
+ - **--aws-env**: AWS environment directory (default: ~/.aws)
76
+ - **--1password**: Use 1Password SSH agent for SSH authentication
77
+ - **--instance**: EC2 instance ID to set up connection for
78
+ - **--hostname**: Hostname to use for SSH configuration (without this, hostname will be generated from instance ID or prompted)
79
+ - **--yes**: Non-interactive mode, use default values for all prompts
80
+
81
+ ### Connect Mode
82
+
83
+ In connect mode, the actual connection is established. This is not used by the user directly, but in the ssh configuration as a proxy command. The command is run using uvx.
84
+
85
+ ### 1Password Integration
86
+
87
+ When the --1password option is used:
88
+ 1. CloudX-proxy first checks if any SSH key with the specified name exists in any 1Password vault
89
+ 2. If the key exists, it's reused (the public key is exported to the filesystem)
90
+ 3. If the key doesn't exist, the user selects which vault to store the newly created key in
91
+ 4. The SSH configuration uses the 1Password SSH agent socket and the public key
92
+
93
+ ### Automation Support
94
+
95
+ The --yes option enables non-interactive mode for use in scripts and automated processes:
96
+ - All prompts use default values
97
+ - Hostname is automatically generated based on instance ID
98
+ - AWS profile must already be configured
99
+ - EC2 instance ID must be provided with the --instance option
100
+
101
+ ## Future Considerations
102
+
103
+ [Potential Breaking Change] Replacing all default values from 'vscode' to 'cloudx' would align the naming but would be a breaking change. This would affect default profile names, SSH key names, and configuration directories.
@@ -1,3 +1,5 @@
1
+ ## [0.4.8](https://github.com/easytocloud/cloudX-proxy/compare/v0.4.7...v0.4.8) (2025-03-07)
2
+
1
3
  ## [0.4.7](https://github.com/easytocloud/cloudX-proxy/compare/v0.4.6...v0.4.7) (2025-03-07)
2
4
 
3
5
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cloudx-proxy
3
- Version: 0.4.7
3
+ Version: 0.4.8
4
4
  Summary: SSH proxy command to connect VSCode with Cloud9/CloudX instance using AWS Systems Manager
5
5
  Author-email: easytocloud <info@easytocloud.com>
6
6
  License: MIT License
@@ -119,6 +119,9 @@ uvx cloudx-proxy setup --ssh-config ~/.ssh/cloudx/config
119
119
  # Setup with 1Password integration
120
120
  uvx cloudx-proxy setup --1password
121
121
 
122
+ # Setup with non-interactive automation
123
+ uvx cloudx-proxy setup --instance i-0123456789abcdef0 --hostname myserver --yes
124
+
122
125
  # Combine options
123
126
  uvx cloudx-proxy setup --profile myprofile --ssh-key mykey --ssh-config ~/.ssh/cloudx/config --1password --aws-env prod
124
127
  ```
@@ -274,6 +277,9 @@ Options:
274
277
  - `--ssh-config` (optional): Path to the SSH config file to use. If specified, configuration and keys will be stored in this location. Default is ~/.ssh/vscode/config.
275
278
  - `--1password` (flag): Enable 1Password SSH agent integration. Creates keys directly in 1Password and configures SSH to use the 1Password SSH agent.
276
279
  - `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
280
+ - `--instance` (optional): EC2 instance ID to set up connection for. If provided, skips the instance ID prompt.
281
+ - `--hostname` (optional): Hostname to use for SSH configuration. If not provided, a hostname will be generated from the instance ID in non-interactive mode or prompted for in interactive mode.
282
+ - `--yes` (flag): Non-interactive mode, use default values for all prompts. Requires sufficient defaults or explicit parameters for all required values.
277
283
 
278
284
  Example usage:
279
285
  ```bash
@@ -69,6 +69,9 @@ uvx cloudx-proxy setup --ssh-config ~/.ssh/cloudx/config
69
69
  # Setup with 1Password integration
70
70
  uvx cloudx-proxy setup --1password
71
71
 
72
+ # Setup with non-interactive automation
73
+ uvx cloudx-proxy setup --instance i-0123456789abcdef0 --hostname myserver --yes
74
+
72
75
  # Combine options
73
76
  uvx cloudx-proxy setup --profile myprofile --ssh-key mykey --ssh-config ~/.ssh/cloudx/config --1password --aws-env prod
74
77
  ```
@@ -224,6 +227,9 @@ Options:
224
227
  - `--ssh-config` (optional): Path to the SSH config file to use. If specified, configuration and keys will be stored in this location. Default is ~/.ssh/vscode/config.
225
228
  - `--1password` (flag): Enable 1Password SSH agent integration. Creates keys directly in 1Password and configures SSH to use the 1Password SSH agent.
226
229
  - `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
230
+ - `--instance` (optional): EC2 instance ID to set up connection for. If provided, skips the instance ID prompt.
231
+ - `--hostname` (optional): Hostname to use for SSH configuration. If not provided, a hostname will be generated from the instance ID in non-interactive mode or prompted for in interactive mode.
232
+ - `--yes` (flag): Non-interactive mode, use default values for all prompts. Requires sufficient defaults or explicit parameters for all required values.
227
233
 
228
234
  Example usage:
229
235
  ```bash
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.4.7'
21
- __version_tuple__ = version_tuple = (0, 4, 7)
20
+ __version__ = version = '0.4.8'
21
+ __version_tuple__ = version_tuple = (0, 4, 8)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cloudx-proxy
3
- Version: 0.4.7
3
+ Version: 0.4.8
4
4
  Summary: SSH proxy command to connect VSCode with Cloud9/CloudX instance using AWS Systems Manager
5
5
  Author-email: easytocloud <info@easytocloud.com>
6
6
  License: MIT License
@@ -119,6 +119,9 @@ uvx cloudx-proxy setup --ssh-config ~/.ssh/cloudx/config
119
119
  # Setup with 1Password integration
120
120
  uvx cloudx-proxy setup --1password
121
121
 
122
+ # Setup with non-interactive automation
123
+ uvx cloudx-proxy setup --instance i-0123456789abcdef0 --hostname myserver --yes
124
+
122
125
  # Combine options
123
126
  uvx cloudx-proxy setup --profile myprofile --ssh-key mykey --ssh-config ~/.ssh/cloudx/config --1password --aws-env prod
124
127
  ```
@@ -274,6 +277,9 @@ Options:
274
277
  - `--ssh-config` (optional): Path to the SSH config file to use. If specified, configuration and keys will be stored in this location. Default is ~/.ssh/vscode/config.
275
278
  - `--1password` (flag): Enable 1Password SSH agent integration. Creates keys directly in 1Password and configures SSH to use the 1Password SSH agent.
276
279
  - `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
280
+ - `--instance` (optional): EC2 instance ID to set up connection for. If provided, skips the instance ID prompt.
281
+ - `--hostname` (optional): Hostname to use for SSH configuration. If not provided, a hostname will be generated from the instance ID in non-interactive mode or prompted for in interactive mode.
282
+ - `--yes` (flag): Non-interactive mode, use default values for all prompts. Requires sufficient defaults or explicit parameters for all required values.
277
283
 
278
284
  Example usage:
279
285
  ```bash
@@ -1,3 +1,4 @@
1
+ .clinerules
1
2
  .gitignore
2
3
  .releaserc
3
4
  CHANGELOG.md
File without changes
File without changes
File without changes
File without changes
File without changes