oci-cli icon indicating copy to clipboard operation
oci-cli copied to clipboard

dynamic port assignment while creating user session

Open AnuravModak opened this issue 1 year ago • 6 comments

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

AnuravModak avatar Dec 11 '23 17:12 AnuravModak

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?

keithshum avatar Jan 31 '24 18:01 keithshum

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.

Djelibeybi avatar Feb 01 '24 20:02 Djelibeybi

I'm going to shift this PR to draft. When you're ready for us to review again, you can switch it back.

Djelibeybi avatar Feb 12 '24 05:02 Djelibeybi

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.

Djelibeybi avatar Feb 12 '24 05:02 Djelibeybi

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.

AnuravModak avatar Feb 25 '24 08:02 AnuravModak

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.

Djelibeybi avatar Feb 25 '24 09:02 Djelibeybi