Git Product home page Git Product logo

pwd-gen's Introduction

pwd-gen

password-generator

This tool is to improve security and workflow for user management in postgres servers.

In general when a new user is created, the password is either shared via organisation's password manager or as a message in slack(this is true in most case).

workflow

  • SRE/DBA creates a new user in server with only login permission and validity set to expire in few hours (12/24 hours)

  • SRE/DBA shares the user name with user, the user who requires to log in and read

    data needs to use reset the password

usage

The app is based on server->client architecture.

Reason - The admin user/super user used to manage the password and validity for users are loaded via env vars. The aim of the app is to secure user credentials to data

by following server-> client approach the server controls all env variables and detached from client layer (which is shared with users).

Based on above decision, any user can expand their validity and get password reset

via cli using below command.

testing server on standalone

> ~/g/pwd-gen on main  grpcurl -plaintext -d '{"user":"test_user"}' \
 --import-path ./protos --proto pwd_gen.proto \
 [::1]:50051 pwdgen.pwdGenerator.UpdatePwdValidity                                   
{
  "user": "test_user",
  "pwd": "2I382ZG8",
  "expiryAt": "2024-04-20 23:20:17.701779945"
}

testing client using cli

> ~/g/pwd-gen on main ⨯ cargo run --bin client -- -u test_user  
 Compiling pwd-gen v0.1.0 (/home/ehrktia/github.com/pwd-gen)
 Finished dev [unoptimized + debuginfo] target(s) in 1.27s
 Running target/debug/client -u test_user
client connecting to:http://[::1]:50051
user:"test_user"
pwd:"7j1CGqfj"
expire_at:"2024-04-21 10:50:09.484403869"

contributing

If you feel like contributing please feel free to raise a PR . Kindly follow commitlint .

issues

feel free to raise any issues in github issue

Todo

  • update bin build approach so client can be shared as pre-built binary

  • filter the super users in server layer to avoid accidental password reset via client

  • fix client testing via cli and args

  • add unit test to check logic for invalid user

pwd-gen's People

Contributors

ehrktia avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.