Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to pass registration code by stdin or file #176

Open
digitaltom opened this issue Jun 16, 2023 · 1 comment
Open

Allow to pass registration code by stdin or file #176

digitaltom opened this issue Jun 16, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@digitaltom
Copy link
Member

digitaltom commented Jun 16, 2023

SUSEConnect is a command line application that allows customers to access the repositories they are subscribed to in an easy way. In order to get these repositories for the first time on a given system, a customer is supposed to "register" the system to SCC (SUSE Customer Center) with a registration code (regcode from now on).

Since early iterations of SUSEConnect, regcodes are provided through the -r parameter (eg.: suseconnect -r 1234). That being said, passing a regcode via command line is insecure as the regcode can be seen in the process list and is usually logged by host intrusion detection systems.

Thus, following standard practices, we should support two new ways to pass regcodes:

  1. Adding support for -r -: passing a dash means "the regcode can be read directly from stdin" (eg.: echo "1234" | suseconnect -r -).
  2. Adding support for -r @/file/path: if the value starts with an '@' sign, then it means that the regcode is provided at the given file (e.g. a secret file created by a Docker container, eg.: suseconnect -r @/my/file).

In order to close this issue you would need to provide a PR that provides both these new ways to pass a regcode value, with their respective tests, and that follows Go's best practices.

@mssola mssola added the good first issue Good for newcomers label Apr 25, 2024
@mssola mssola self-assigned this Apr 25, 2024
@mssola mssola added the enhancement New feature or request label Apr 25, 2024
@felixsch felixsch added the help wanted Extra attention is needed label Jun 19, 2024
@Parag09
Copy link

Parag09 commented Jun 26, 2024

Heyy @digitaltom @mssola @felixsch

I am new to this open source repo. I wanted to contribute so I have created a pull request for the above issue. Please review it and provide comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants