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

Endpoint, Token, Cert Path, and Cert Key Storage for CLI Tool #2

Open
tolgaOzen opened this issue Dec 8, 2023 · 21 comments
Open

Endpoint, Token, Cert Path, and Cert Key Storage for CLI Tool #2

tolgaOzen opened this issue Dec 8, 2023 · 21 comments
Labels
💎 Bounty feature request New feature or request go Pull requests that update Go code

Comments

@tolgaOzen
Copy link
Member

Description

We need to implement a feature for storing the endpoint, token, cert path, and cert key in the CLI tool. These credentials should be retrievable from the storage for later use during the client creation process.

Location

permify-cli/internal/client/client.go

Proposed Change

Modify the New function in client.go to retrieve stored credentials. The updated function could look something like this:

func New(endpoint string) (*permify.Client, error) {
    // Retrieve credentials from storage
    // ... (code to retrieve credentials)

    client, err := permify.NewClient(
        permify.Config{
            Endpoint: endpoint,
            // Other necessary configurations
        },
        grpc.WithTransportCredentials(insecure.NewCredentials()),
    )
    return client, err
}

Additional Notes

Ensure that the credential retrieval process is secure and efficient.
Include error handling for cases where credentials are missing or incorrect.

@tolgaOzen
Copy link
Member Author

/bounty $200

Copy link

algora-pbc bot commented Dec 8, 2023

💎 $200 bounty • Permify.co

Steps to solve:

  1. Start working: Comment /attempt #2 with your implementation plan
  2. Submit work: Create a pull request including /claim #2 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Don't wait to be assigned. A reward will be given for the best PR.

Thank you for contributing to Permify/permify-cli!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @Pavan-Nambi Dec 8, 2023, 8:56:59 AM WIP
🟢 @wanmail Apr 9, 2024, 3:39:50 PM WIP
🟢 @kumarvikramshahi Jun 22, 2024, 1:44:41 PM WIP
🟢 @Sadaf-A Aug 10, 2024, 4:48:57 AM WIP
🟢 @radasam Aug 24, 2024, 11:58:48 AM WIP

@tolgaOzen tolgaOzen added feature request New feature or request go Pull requests that update Go code labels Dec 8, 2023
@Pavan-Nambi
Copy link

/attempt #2

Copy link

algora-pbc bot commented Dec 8, 2023

@Pavan-Nambi: The Permify.co team prefers to assign a single contributor to the issue rather than let anyone attempt it right away. We recommend waiting for a confirmation from a member before getting started.

@Pavan-Nambi
Copy link

hey @tolgaOzen can i work on this?

@tolgaOzen
Copy link
Member Author

@Pavan-Nambi, I have assigned this issue to you. Happy hacking 🚀

@Pavan-Nambi
Copy link

Pavan-Nambi commented Dec 9, 2023

hey @tolgaOzen , I am bit new to codebase but by storage u mean to store them in some env/yml files? or something else?

we retrive from something like this config file?? or some vaults?

@tolgaOzen
Copy link
Member Author

tolgaOzen commented Dec 9, 2023

Hello @Pavan-Nambi, by storage I mean a way to prevent users from having to repeatedly enter their credentials when connecting to the Permify API. For this, you can use the path ~/.permify/credentials on macOS and Linux, and C:\Users\USERNAME\.permify\credentials on Windows. Here, you can store the endpoint, token, certificate path, and certificate key. When user wants to communicate with Permify APIs, Permify CLI can read these details from there. I hope this is clear.

@Pavan-Nambi
Copy link

got it, thanks

@Pavan-Nambi
Copy link

@tolgaOzen i've made a pr #8 based on what i understood lmk if i did anything wrong, or if u want me to change anything

@Rutik7066
Copy link

Hey @tolgaOzen can i work on this one?

@wanmail
Copy link

wanmail commented Apr 9, 2024

/attempt #2

@Pavan-Nambi Pavan-Nambi removed their assignment Apr 19, 2024
@vivasvan1
Copy link

Putting myself on the queue for collab or in case this needs to be reassigned ✋
@tolgaOzen

1 similar comment
@snigdha510
Copy link

Putting myself on the queue for collab or in case this needs to be reassigned ✋
@tolgaOzen

@kumarvikramshahi
Copy link

kumarvikramshahi commented Jun 22, 2024

Since the issue is not assigned to anyone, I would like to give it a shot or would be happy to collab if possible.
@tolgaOzen Please check if the issue can be reassigned.
/attempt #2

@connorbrez
Copy link

Hello @tolgaOzen, it doesn't look like anyone is assigned this task. I am interested in working on this, could you assign me this task?

@Sadaf-A
Copy link

Sadaf-A commented Aug 10, 2024

/attempt #2

@Sadaf-A
Copy link

Sadaf-A commented Aug 10, 2024

Greetings @tolgaOzen, could you please assign this to me?

@radasam
Copy link

radasam commented Aug 24, 2024

/attempt #2

@radasam
Copy link

radasam commented Aug 24, 2024

@tolgaOzen I can see that since this was created a config file has been implemented to store the endpoint, Do we just need to follow the same process for the token + cert, or is this not needed anymore?

@akhilender-bongirwar
Copy link

@tolgaOzen, is this issue still open to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty feature request New feature or request go Pull requests that update Go code
Projects
None yet
Development

No branches or pull requests