Hi,
I'm using NixOs to securely deploy keys in-memory without actually storing them on disk.
Therefor it would be a great addition to be able to configure the keyPath in the Passport class.
From the code it seems like this is already configurable, I just can't find the proper configuration setting to change this path. As I'm no Laravel expert, maybe I'm just overlooking the correct configuration key.
In addition, being able to configure the names of both public & private key files would also increase the deploy flexibility as these are currently hardcoded to "oauth-privat.key" and "oauth-public.key"
Kind regards and keep up the great work!
Erik
have a look here if this solves your problem
https://github.com/mms-gianni/passport/pull/1
I'm not using this solution, since it is a a better practice to regenerate the keys after every deployment on Heroku.
Hi @mms-gianni,
That's exactly what I'm looking for! Great to see I'm not alone with this feature request ;-)
Closing for lack of activity, hope you got the help you needed :)
Also feel free to propose a PR if you want the feature to be added.
Hi @themsaid,
there is already a PR that @mms-gianni proposed, sad to see this is still not even looked at. Now you just close this issue suggesting I should "feel free to propose a PR"??
Disappointed...
@4levels i feel like this is a uncommon approach, yet extremely easy to implement into your own application.
Just copy&paste or extend the PassportServiceProvider and overwrite 1 line.
There is no need for a PR and nothing for @themsaid to do here, so do not feel disappointed but rather thankful for him cleaning up non-issues.
I'm sorry if I misunderstood something here, but not being able to use Laravel/Lumen with Passport on Heroku, Docker, NixOps or other deployment platforms is a major issue IMHO. I like Laravel/Lumen a lot but the unwillingness to listen to issues is really striking!
Like you said yourself, if it's just 1 line of code that needs to be changed, why not merge this in the first place, instead of us having to extend or even worse, copy&paste stuff around.
The only "lack of activity" comes from your team not even bothering as far as I can see..
Laravel/Lumen including Passport works perfectly with Heroku, Docker, NixOps or other deployment platforms.
Your concern is neither a security-issue nor an issue, it's just something you want for your own convenience, so why not write your own provider for it? It's really not that complicated.
<?php
namespace App\Providers;
use Laravel\Passport\Bridge;
use Laravel\Passport\PassportServiceProvider;
class CustomPassportServiceProvider extends PassportServiceProvider
{
/**
* Make the authorization service instance.
*
* @return \League\OAuth2\Server\AuthorizationServer
*/
public function makeAuthorizationServer()
{
return new AuthorizationServer(
$this->app->make(Bridge\ClientRepository::class),
$this->app->make(Bridge\AccessTokenRepository::class),
$this->app->make(Bridge\ScopeRepository::class),
config('what.ever.key'), // HERE
app('encrypter')->getKey()
);
}
}
Instead of attacking the Laravel team about an unimportant edge case and non-issue, I'd be more concerned about you freaking out about 1 line of code and why you obvs. couldn't solve it yourself within 1/2 year.
Nonetheless, hope this works for you.
Cheers & you're welcome.
Hi @arubacao,
Your statement that Laravel/Lumen works perfectly with NixOps is plain false and shows you have no idea how secure credentials are handled in Nix.
I solved this issue long time ago with the help of @mms-gianni, no need to repeat his solution here.
Me freaking out looks entirely different and this is not me "attacking the Laravel team", but if you're that lightly offended over a perfectly valid issue, that's just sad and not how issues should be treated in my world (no action whatsoever and simply closing for no valid reason).
Looks very similar to my other reported issues #258 #259 and #260 and the response from the Laravel/Lumen team - have a look and you'll understand my disappointement.
I don't want to light a fire, but i was looking for the exact same thing as 4levels, and the PR of mms-gianni look quite good to me too. Why not integrating it ?
Most helpful comment
Hi @mms-gianni,
That's exactly what I'm looking for! Great to see I'm not alone with this feature request ;-)