Coder Social home page Coder Social logo

yubico-rs's Introduction

Flávio Oliveira

Twitter Badge Linkedin Badge Gmail Badge

  • ⚡ Languages: Rust, typescript, python
  • 🎧 Hobbies : Music, SciFi, Space News

yubico-rs's People

Contributors

dani-garcia avatar kingli-crypto avatar mihaigalos avatar paolobarbolini avatar pierre-l avatar uiri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

yubico-rs's Issues

Breaking change in 0.9.2

Hey folks,

The recently released version 0.9.2 contains a breaking change due to upgrading reqwest to 0.11. That version uses Tokio 1.0, making this crate no longer compatible with projects that still haven't migrated to Tokio 1.x.

This shows up as a runtime panic saying it could not find a Tokio 1.x executor running.

It may be a good idea to yank this version and release it as 0.10.

Panic when Caller Exits Early when Verifying OTP Against Multiple Servers

When verifying against multiple OTP servers, the caller may exit before other threads finish, and as a result, will call an invalid channel Sender that no longer exists and panic.

This is due to how (according to spec) it sends out 5 requests simultaneously to the default YubiCloud servers, and if one of the threads returns that the OTP is ok, it will immediately return the result to calling code. Unfortunately, after the verify caller exits, the other threads will still be alive and will receive responses and attempt to send then back to the caller through a channel that no longer exists and will panic.

A way to tackle it would be forcibly quitting all other threads once one has returned successfully.

Conditional compilation vs multiple crates

Hi,

It appears I made a couple mistakes in my recent work on supporting asynchronous requests. I find it quite hard to maintain all the conditional compilation annotations across the whole crate. In the meantime, I think the USB use case and the online one are very different and I can hardly think of a use case for both at the same time. I would like to split the crate into these crates:

  • yubico-core: shared code, crypto, etc.
  • yubico-usb
  • yubico-online

This would make it easier to segregate imports for both the crate developers and its users.

Would you agree with that?

Allow usage of self-hosted OTP validation

Currently you just have the host boiled into the code, making it so people are required to be using the default yubico OTP validation server, but it's possible to host your own.

Implement Challenge/ Response auth

Would you be interested in implementing that mode to this crate?

I'm not super familiar with how yubikeys work so I'm not sure I could help with anything but looking at the available modes (and wanting to support yubikey in one of my applications) it feels like the most fitting one for me to use

Make reqwest/OpenSSL an optional dependency

For a current project, the reqwest dependency introduces an unwanted openssl linkage, I build to a muslc target which makes linking OpenSSL rather cumbersome and the final project will not make use of the verification feature that Yubico offers. Since I can't link OpenSSL I made a small patch which introduces a new "online" feature. By setting default features to false, the crate will build without any online functionality (ie, verifying codes against the yubico servers), this functionality is enabled by using the online feature.

The patch mostly consists of disabling various code via a #[cfg] macro.

yubico-rs.patch

Add support to optionally specify an HTTP proxy for communication with Yubico servers

The Yubico crate already use the "reqwest" crate for communication with Yubico servers, however the Yubico crate does not allow to specify HTTP proxy settings, the "reqwest" create has an option to specify an HTTP proxy when buidling a "reqwest" client.

Please add the option to specify a "reqwest" client (with proxy settings) before invoking the verify, will be a nice feature.

The following link shows how an HTTP proxy can be specified when building a reqwest client:
https://docs.rs/reqwest/0.10.6/reqwest/struct.Proxy.html

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.