Giter VIP home page Giter VIP logo

Comments (6)

salrashid123 avatar salrashid123 commented on June 20, 2024

You're right, i'll look into this shortly and reusue that code that understand and URI format.

i'll also see if i can adapt a sample so its more generic (eg for psanford/awsv4signer)

@psanford

fyi, go-tpm and go-tpm-tools needs to support hmac import and even use

google/go-tpm-tools#317

thanks!

from aws_hmac.

salrashid123 avatar salrashid123 commented on June 20, 2024

i'll have to update the the go-jwt issuer for pkcs as well

https://github.com/salrashid123/golang-jwt-pkcs11

from aws_hmac.

salrashid123 avatar salrashid123 commented on June 20, 2024

this repo uses low-level github.com/miekg/pkcs11 constructs and its not easy to account for and appropriately inject values if given just the URI. closing this but will entertain if upstream miekg/pkcs11 supports interprting the uri on its own

from aws_hmac.

dwmw2 avatar dwmw2 commented on June 20, 2024

The code at https://github.com/stefanberger/go-pkcs11uri wraps around the miekg/pkcs11 code and provides the necessary URI parsing support.

Matching a PKCS#11 token given a URI, or generating a FindObjects template from a URI, is then fairly simple; examples in the matchSlots() and getFindTemplate() functions in https://github.com/dwmw2/rolesanywhere-credential-helper/blob/pkcs11/aws_signing_helper/pkcs11_signer.go

from aws_hmac.

dwmw2 avatar dwmw2 commented on June 20, 2024

I do agree it would be better if the underlying modules made it easy for applications to get this right. Filed miekg/pkcs11#170

from aws_hmac.

salrashid123 avatar salrashid123 commented on June 20, 2024

i'll reopen this and await the upstream changes (which would address using the uri much easier for everyone and give near automatic support)

also noticed the issue for the thales library (which i also use elsewhere):
ThalesGroup/crypto11#104

from aws_hmac.

Related Issues (1)

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.