Enable integration with third-party signing #1057
Replies: 4 comments 4 replies
-
This won't fly anyway: dependencies are there, or aren't 😁 Optional dependencies are not really a thing: they are crashes waiting to happen. I suggest you first implement it privately in your project, then consider publishing a package if it works for you first. |
Beta Was this translation helpful? Give feedback.
-
Not upset: I just try and keep convos tidy: it's perfectly fine to discuss here 👍 |
Beta Was this translation helpful? Give feedback.
-
Allow my 0,02€ here: AWS signing a JWT probably is a generic problem - in the Amazon cloud environment. It's not for users of Microsoft's or Googles cloud, and it probably would not make sense to attach all three cloud providers client libraries here just to provide a multi-generic solution. And I also want to emphasize that there is no such thing as an optional dependency. From maintainer perspective, it is quite a pain to maintain, and from consumers perspective, it is, as Ocramius briefly said, a crash waiting to happen: The dependency is only suggested, no specific version is requested, either forgetting to install it or running into version conflicts with that package already installed in the wrong version, can only be found out during runtime. Which hopefully would be unit test time if you are smart enough to write the correct tests, but might easily be production run time if enough bad decisions are in place. |
Beta Was this translation helpful? Give feedback.
-
I just started implementing it yesterday and I think it goes in the direction of a dedicated package. Like @SvenRtbg is saying, it is probably more specific to AWS itself, even though that support is generic. We got a PoC working based on ECDSA SHA 256 - aka We came to realize we probably just need to observe the same pattern as the classes in the |
Beta Was this translation helpful? Give feedback.
-
Following #93 (comment)
Damn, @Ocramius got upset quick I couldn't even answer @SvenRtbg
If you see the issue as a feature request, I don't see what's the problem if it is an old thread or a new one, from a project management perspective it is still valid to me - aka using a cloud service like AWS for managing asymmetric keys involves NOT having access to the private key by definition but only an API.
I know, I read the thread 😅
Like I said, I can do it myself and sure enough we already use the AWS Client library, there is no problem here except that it seems to me that this is a generic problem with a generic solution.
I searched on packagist so maybe there is a library extending
lcobucci/jwt
but no.So basically, since we probably have to develop a custom unit-tested AWS KMS
Signer
forlcobucci/jwt
, what option is best?lcobucci/jwt
Signer
andlcobucci/jwt
adds an OPTIONAL dependency onaws/aws-sdk-php
Or else?
We still have some projects stuck on v4 because of PHP 7.4 so we'll most probably need to backport it.
What's your vibe on this?
Beta Was this translation helpful? Give feedback.
All reactions