What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hey, trying to upgrade one of our modules in ZED, and getting the following there: ``` Spryker \ Ser
Hey, trying to upgrade one of our modules in ZED, and getting the following there:
Spryker \ Service \ Container \ Exception \ NotFoundException The requested service "security.authentication_providers" was not found in the container!
can you help me pinpoint where this is configured in ZED (so: where do we miss it)?
Comments
-
Do you have SecurityApplicationPlugin() in
src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php:247
getApplicationPlugins()
method?0 -
yes:
protected function getApplicationPlugins(): array { $applicationPlugins = [ new TwigApplicationPlugin(), new EventDispatcherApplicationPlugin(), new ShopApplicationApplicationPlugin(), new StoreApplicationPlugin(), new LocaleApplicationPlugin(), new TranslatorApplicationPlugin(), new RouterApplicationPlugin(), new SessionApplicationPlugin(), new HttpApplicationPlugin(), new ErrorHandlerApplicationPlugin(), new FlashMessengerApplicationPlugin(), new FormApplicationPlugin(), new ValidatorApplicationPlugin(), new SecurityApplicationPlugin(), new ShopContextApplicationPlugin(), new CustomerConfirmationUserCheckerApplicationPlugin(), ];
0 -
from what I understand providers are from
\Spryker\Yves\Security\Plugin\Application\SecurityApplicationPlugin::getFirewallMap
but what is this referring to?0 -
$securityAuthenticationProviders = array_map(function ($provider) use ($container) { return $container->get($provider); }, array_unique($providers)); $container->set(static::SERVICE_SECURITY_AUTHENTICATION_PROVIDERS, $securityAuthenticationProviders);
how to check If i have this set "correctly" ?
0 -
put a breakpoint and debug?
0 -
I'm afraid I need a "correct" reference to see if what I'm getting is correct
0 -
right now I have nothing to compare this to, and it might be I'm missing some config I cannot find
0 -
Iβd say drop a breakpoint in the place where it should be set, then where it should be retrevied
0 -
youβll then know if both places work, and the config parameter is filled
0 -
but itβs very funny
0 -
because if youβd look here
0 -
\Spryker\Yves\Security\Plugin\Application\SecurityApplicationPlugin::provide
0 -
the method in which it is used is:
0 -
$container = $this->addAuthenticationManager($container);
0 -
and the method where it set is:
0 -
$container = $this->addFirewall($container);
0 -
and it is executed afterwads π€·
0 -
can you maybe check and tell me if
Error: Class 'Spryker\Zed\SecuritySystemUser\Communication\Plugin\Security\SystemUserSecurityPlugin' not found in file /src/Pyz/Zed/Security/SecurityDependencyProvider.php on line 26
you maybe have this file?
0 -
ah ok, so this was indeed missing in zed all along
0 -
I donβt have this file
0 -
but itβs also not there in the array
0 -
yeah, most likely some leftover from the upgrade
0 -
ok I can add
new SecurityApplicationPlugin(), to
\Pyz\Zed\Application\ApplicationDependencyProvider
to get rid ofThe requested service "security.authentication_providers" was not found in the container!
but this gives me
InvalidArgumentException: You must at least add one authentication provider. in file vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php on line 51
so I guess there's more to it π
0 -
giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 π§π»βπ - Cadet
I think is missing security-gui in your project...
auth bundle is deprecated and replaced from security and security-gui bundlessecurityDependencyProvider should be so;:
class SecurityDependencyProvider extends SprykerSecurityDependencyProvider { /** * @return \Spryker\Shared\SecurityExtension\Dependency\Plugin\SecurityPluginInterface[] */ protected function getSecurityPlugins(): array { return [ new UserSessionHandlerSecurityPlugin(), new SystemUserSecurityPlugin(), new MerchantUserSecurityPlugin(), new UserSecurityPlugin(), ]; } }
and u have to register the new security application plugin
Spryker\Zed\Security\Communication\Plugin\Application\SecurityApplicationPlugin
in\Pyz\Zed\Application\ApplicationDependencyProvider::getApplicationPlugins
andSpryker\Yves\Security\Plugin\Application\SecurityApplicationPlugin
in\Pyz\Yves\ShopApplication\ShopApplicationDependencyProvider::getApplicationPlugins
0 -
MerchantUserSecurityPlugin
is needed only if you want to use merchant user login into Merchant Portal.
SystemUserSecurityPlugin
is for ZedRequests from Yves/Glue to Zed
UserSecurityPlugin
For regular admin users to login into Zed Backoffice
Important thing here is you need to have
symfony/security-http
v4 || v50
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random