Should we create a shared net-sasl gem?
@shugo já está trabalhando nisso.
Desde 28/4/2021.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Currently, the following gems duplicate partial support for a small subset of SASL mechanisms:
- net-imap
- net-smtp
- net-pop (it's actually missing, but it should be in there)
- net-ldap
- blather (XMPP)
- memcached
- dalli (another memcached client)
- ...and probably many others.
This duplication and incomplete support basically defeats the purpose of SASL. It seems to me that SASL is used in a wide enough number of internet protocols that some level of SASL support should be in stdlib. See e.g. it's in java standard edition
We could start with a very simple API, which only handles client-side authentication and doesn't do much more than Net::IMAP already does. Simply providing a standard for pluggable support is useful. E.g here's a starter proposal:
class Net::SASL::Registryto allow non-global config, so e.g. a mechanism could be added toNet::IMAPwithout affecting other libraries.#add_authenticator(name, mechanism_class)#authenticator(name, *args)- both of these methods would also be available from a global registry on
Net::SASL
Net::SASL::Authenticatorinterface (can provide a super-class withNotImplementedErroronperform):#initialize(*credentials, uri: nil)- some mechanisms require the host and port, and supporting that in the generic interface simplifies making clients work properly regardless of which mechanism is selected.
#supports_initial_response?#process(challenge)- just as withNet::IMAP. IR sends anilchallenge#done?- for mechanisms implementing a state machine, users of the library can know it is done without needing to call#performand catch an exception.respond_to?(...)could be used for backwards compatibility with Net::IMAP authenticators which haven't yet been updated to addsupports_initial_response?or#done?.
- utility methods:
Net::SASL.saslprep(string)- implements RFC4013, which is required by some mechanisms and recommended for others
And, of course, we could start by adding the existing Net::IMAP mechanisms. But it would be simple and very useful to add OAUTHBEARER and some others as well.
I've marked #22 as a draft, pending some discussion about this. Is this the correct place to discuss this? Should I create a ticket in the ruby issue tracker?
- #22
- #183
- #187
- #194
- #195
- Linguagem predominante
- Ruby
- Estrelas
- 121
- Forks
- 47
- Merge médio
- 19h 25min
- PRs com merge (30d)
- 3
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ruby/net-imap
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
-
bug
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 30/100
-
Cannot use FakeServerAberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 25/100
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 15/100
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 20/100
Todas as issues de ruby/net-imap
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia
-
Websockify heartbeat for vnc_containerTalvez já em andamento @robinkar assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
needs verification
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 7 dias
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
akitaonrails/ai-book-2026#13 ·
-
Mend: dependency security vulnerability
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 63/100
Mantenedores costumam responder em até 1 dia