Re: Naming of Module to generate an encrypted password in the PostgreSQL SCRAM format
[email protected] (Dan) Mon, 6 Jan 2025 14:28:45 -0500
| Newsgroups | perl.module-authors |
|---|---|
| Message-ID | <CABMkAVXV_qOKfqHJW_QtSw+QX1_vh1yrOKFC_u5J6vuxBguxog@mail.gmail.com> |
--000000000000b4ecb2062b0ea328 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 6, 2025 at 1:09=E2=80=AFPM Guido Brugnara via module-authors < [email protected]> wrote: > I will preface this by saying that I am a beginner in the use of PAUSE, e= ven > though I registered my name (BRUGNARA) many years ago, without using it > until now. > > I read [1] that it is recommended to ask for advice in this mail-list in > naming new modules. > > I would like to publish a new module to generate SCRAM encrypted password > in the format used by PostgreSQL. > > A source code (usable from the command line) can be found here: > > https://www.leader.it/en/Blog/PostgreSQL_SCRAM-SHA-256_authentication > > I just need to rewrite it using the appropriate package by making > available method, or an exported function > > A name, I think suitable, could be: > > Postgresql::Password::SCRAM > > I would be grateful in receiving your opinion. > Seems reasonable to me; if you think a name less tied specifically to Postgres would be appropriate, you could consider the Crypt:: top level namespace, possibly still with a reference to PostgreSQL if it is a specific algorithm for that. You also might avoid "Password" as the function is an encryption scheme not a password generator. Note that for discoverability, searches on metacpan will also easily find terms mentioned in the module's abstract in the NAME section, and the DESCRIPTION (see perldoc perlpodstyle). As a side note, Crypt::Salt uses the built in rand() which is not cryptographically secure; you may consider something like Crypt::URandom or Math::Random::Secure to retrieve securely random bytes for a salt. In case you need any tips regarding distribution layout and authoring, you may find the beginning of my Dist::Zilla::Starter guide[1] useful (whether or not you decide the bundle itself or dzil is useful). Welcome to CPAN authoring! -Dan [1] https://metacpan.org/pod/Dist::Zilla::Starter --000000000000b4ecb2062b0ea328 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">On Mon, Jan 6, 2025 at 1:09=E2=80=AFPM Gu= ido Brugnara via module-authors <<a href=3D"mailto:[email protected]= rg">[email protected]</a>> wrote:</div><div class=3D"gmail_quote g= mail_quote_container"><blockquote class=3D"gmail_quote" style=3D"margin:0px= 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u>= </u> =20 =20 =20 <div> <p><span>I will preface this by saying that I am a beginner in the use of PAUSE, </span><span>even though I registered my name (BRUGNARA) many years ago, </span><span= >without using it until now</span><span>.</span></p> <p><span>I read [1] that it is recommended to ask for advice in this mail-list in naming new modules.</span></p> <p><span>I would like to publish a new module to generate SCRAM encrypted password in the format used by PostgreSQL.</span></p> <p><span>A source code (usable from the command line) can be found here:<br> </span></p> <p><span>=C2=A0=C2=A0=C2=A0 <a href=3D"https://www.leader.it/en/Blog/PostgreSQL_SCRAM-SHA-256_authentic= ation" target=3D"_blank">https://www.leader.it/en/Blog/PostgreSQL_SCRAM-SHA= -256_authentication</a></span></p> <p><span>I just need to rewrite it using the appropriate package by making available method, or an exported function</span><span></span></p> <p><span>A name, I think suitable, could be:</span></p> <p><span>=C2=A0=C2=A0=C2=A0 Postgresql::Password::SCRAM</span></p> <p><span>I would be grateful in receiving your opinion.</span></p></div></bloc= kquote><div><br></div><div>Seems reasonable to me; if you think a name less= tied specifically to Postgres would be appropriate, you could consider the= Crypt:: top level namespace, possibly still with a reference to PostgreSQL= if it is a specific algorithm for that. You also might avoid "Passwor= d" as the function is an encryption scheme not a password generator. N= ote that for discoverability, searches on metacpan will also easily find te= rms mentioned in the module's abstract in=C2=A0the NAME section, and th= e DESCRIPTION (see perldoc perlpodstyle).</div><div><br></div><div>As a sid= e note, Crypt::Salt uses the built in rand() which is not cryptographically= secure; you may consider something like Crypt::URandom or Math::Random::Se= cure to retrieve securely random bytes for a salt.</div><div><br></div><div= >In case you need any tips regarding distribution layout and authoring, you= may find the beginning of my Dist::Zilla::Starter guide[1] useful (whether= or not you decide the bundle itself or dzil is useful).</div><div><br></di= v><div>Welcome to CPAN authoring!</div><div><br></div><div>-Dan=C2=A0</div>= <div><br></div><div>[1]=C2=A0<a href=3D"https://metacpan.org/pod/Dist::Zill= a::Starter">https://metacpan.org/pod/Dist::Zilla::Starter</a></div></div></= div> --000000000000b4ecb2062b0ea328--