oci-cli
oci-cli copied to clipboard
dynamic port assignment while creating user session
Towards #732.
Description:
In this pull request, I've reviewed the code for creating a user session, specifically focusing on src\oci_cli\cli_setup_bootstrap.py. The current implementation statically assigns a port, which is hard-coded. This limitation can pose challenges for users who need to ensure port availability manually, interrupting the workflow and installation process.
Proposed Changes:
I propose enhancing the code by introducing a dynamic port assignment approach. The current implementation restricts users to the default port (8181), and the proposed changes aim to provide flexibility by dynamically selecting an available port. This improvement ensures a smoother user experience during the user session creation process.
Open Discussion:
As this is my initial review of the code, I welcome contributions and insights from fellow collaborators to ensure the proposed changes align with the project's goals and requirements.
@harshkumar-dev , @HamadaGabrIbrahim, @mross22, @vish1, @kernleee , @karthik-k-kamath
Thanks for opening this, I am also facing issue on this hardcoded 8181, OCI team, what do we need to do on pushing this change?
The other option is to add a command-line parameter with associated environment variable that allows the end user the ability to specific which port to use. Which is better from a security perspective, becuase having a dynamic port wouldn't work with restrictive firewalls.
I'm going to shift this PR to draft. When you're ready for us to review again, you can switch it back.
btw, this is how I approached implementing this improvement: https://github.com/Djelibeybi/oci-cli/tree/gh-732
I'm still waiting to hear from some internal teams as changing this port cannot be done only the client side. We need server-side support as well.
btw, this is how I approached implementing this improvement: https://github.com/Djelibeybi/oci-cli/tree/gh-732
I'm still waiting to hear from some internal teams as changing this port cannot be done only the client side. We need server-side support as well.
yes, i have gone through your changes, and after seeing your implementation, now even i am doubtful whether we can add this implementation from frontend alone, anyways if u find anyone from server side, you can always ping me up on slack at @anumodak.
A variation on my version is currently being tested internally and should hopefully be released soon. I don't have an ETA for release yet, though.