GithubHelp home page GithubHelp logo

Comments (8)

LDVG avatar LDVG commented on August 30, 2024

Hi,

Thank you for your request! This has some similarity to the proposed solution to #209. The suggested implementation can be found under the experimental cue branch . If you want to give that a go, we'd be happy for any feedback.

Note that some clients may display the messages later than expected, not at all, or immediately overwrite it with something else. While we can't do much about the clients themselves in this project, we'd nonetheless like to hear about your experience, preferably with as many clients as possible!

from pam-u2f.

LecrisUT avatar LecrisUT commented on August 30, 2024

After a lot of trial and error getting a development environment for this, in the end the proposed solution this not work. Still only invalid login is shown. Maybe I didn't compile it correctly.

from pam-u2f.

LDVG avatar LDVG commented on August 30, 2024
  • After compiling, have you pointed the service configuration to your build of pam_u2f.so?
  • What application/client are you attempting to authenticate with?

from pam-u2f.

LecrisUT avatar LecrisUT commented on August 30, 2024

I have copied it in place from build/.lib/pam_u2f.so to /usr/lib64/security/pam_u2f.so.

I have tried plain linux authenthication: ctrl+alt+F4 and login after changing authselect

from pam-u2f.

LDVG avatar LDVG commented on August 30, 2024

For sanity checking: Was the build out of the cue branch? Is the cue flag still present in the service configuration? What happens if you test through e.g. sudo?

from pam-u2f.

LecrisUT avatar LecrisUT commented on August 30, 2024

Here's the template of authselect:

auth        requisite                                    pam_u2f.so cue {if not "without-pam-u2f-nouserok":nouserok} {include if "with-pam-u2f-2fa"}

Get rid of the curly statements and yes, cue flag is present. I am not asked to insert the pin though. I did not try the cue branch, but I replaced a similar line there with:

        } else {
          converse(pamh, PAM_TEXT_INFO, fido_strerr(r));
        }

Specificly:

        if (r == FIDO_OK) {
          if (opts.pin == FIDO_OPT_TRUE || opts.uv == FIDO_OPT_TRUE) {
            r = fido_assert_set_uv(assert, FIDO_OPT_TRUE);
            if (r != FIDO_OK) {
              debug_dbg(cfg, "Failed to set UV");
              goto out;
            }
          }
          r = fido_assert_verify(assert, 0, pk.type, pk.ptr);
          if (r == FIDO_OK) {
            retval = 1;
            goto out;
          }
        } else {
          converse(pamh, PAM_TEXT_INFO, fido_strerr(r));
        }

I did not test sudo or other applications, if I find the time to thoroughly debug it, maybe I'll test some more.

from pam-u2f.

LDVG avatar LDVG commented on August 30, 2024

OK. Your modification will only print out an error if an authenticator is found but an error occurs when trying to authenticate using it (e.g. user presence is not collected, PIN does not verify, etc.). To also print out an error message when no authenticators are found, you need additional changes.

from pam-u2f.

LecrisUT avatar LecrisUT commented on August 30, 2024

Ok, with the cue branch. It does print out suitable error messages. Can mark that PR to close this issue

from pam-u2f.

Related Issues (20)

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.