Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

security.acl.provider service not found #2524

Closed
olegstepura opened this issue Oct 31, 2011 · 14 comments
Closed

security.acl.provider service not found #2524

olegstepura opened this issue Oct 31, 2011 · 14 comments

Comments

@olegstepura
Copy link
Contributor

Hi! After updating to latest version from github the error appears:

[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
  The service "security.acl.permission_evaluator" has a dependency on a non-existent service "security.acl.provider".

Seems like this service has been removed but it's dependencies not.

This one a critical since the service container compilation fails.

@olegstepura
Copy link
Contributor Author

Oops my bad. This one is related to JMSSecurityExtraBundle

@olegstepura
Copy link
Contributor Author

Well, looking through code it seems like that service must be in. Maybe still a Symfony-related issue

@schmittjoh
Copy link
Contributor

Do you use the ACL system of the security component?

@olegstepura
Copy link
Contributor Author

No, but previously my test worked without it...

@schmittjoh
Copy link
Contributor

This should be fixed now:
schmittjoh/JMSSecurityExtraBundle@b1bfa03

@olegstepura
Copy link
Contributor Author

adding

  acl:
    connection: default

to security.yml seem to fix the problem

But it (or maybe update) breaks the existing Security configuration (in_memory provider, admin:kitten, etc)

@schmittjoh
Copy link
Contributor

This shouldn't be necessary after you update the bundle again.

@olegstepura
Copy link
Contributor Author

I did. And removed the acl config in security.yml. But still get a infinite redirect loop on login with this config (which previously worked):

security:
  providers:
    in_memory:
      users:
        admin: { password: kitten, roles: 'ROLE_SUPER_ADMIN' }
#    fos_userbundle:
#      id: fos_user.user_manager

  firewalls:
    backend:
      pattern: ^/backend
      form_login:
        check_path: /backend/auth/login_check/
        login_path: /backend/auth/login/
      logout:
        path: /backend/auth/logout/
        target: /backend/
      security: true
      anonymous: true

  access_control:
    - { path: ^/backend/auth, role: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/backend/test, role: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/backend, role: ROLE_ADMIN }

  role_hierarchy:
    ROLE_ADMIN: ROLE_USER
    ROLE_SUPER_ADMIN: ROLE_ADMIN

  encoders:
    Symfony\Component\Security\Core\User\User: plaintext

/backend/auth/login/ redirects to /backend/auth/login/ and so on...

@schmittjoh
Copy link
Contributor

That might be a different problem. What else did you update?

@olegstepura
Copy link
Contributor Author

Well, actually everything. =)

Here is what is in:

            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\MonologBundle\MonologBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
            new Symfony\Bundle\AsseticBundle\AsseticBundle(),
            new JMS\AopBundle\JMSAopBundle(),
            new JMS\DiExtraBundle\JMSDiExtraBundle($this),
            new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
            new Symfony\Bundle\DoctrineMigrationsBundle\DoctrineMigrationsBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),
            new Knp\Bundle\MenuBundle\KnpMenuBundle(),
            new FOS\UserBundle\FOSUserBundle(),
        );
        if ($this->getEnvironment() === 'dev') {
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
            $bundles[] = new Elao\WebProfilerExtraBundle\WebProfilerExtraBundle();
            $bundles[] = new JMS\DebuggingBundle\JMSDebuggingBundle($this);
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
        }  

All being updated to latest git versions. But is't only JMSSecurityExtraBundle and Symfony itself related to security component as far as I can tell.

@olegstepura
Copy link
Contributor Author

ok, downgraded everything to previous state

Updated symfony - everything ok.
Updated JMSSecurityExtraBundle - got infinite redirect loop

Do I need to report this to JMSSecurityExtraBundle, Johannes?

@schmittjoh
Copy link
Contributor

Thanks for debugging, I've pushed another fix which should now put that to a usable state again:
schmittjoh/JMSSecurityExtraBundle@52dead5

@olegstepura
Copy link
Contributor Author

Confirm to work now.

@olegstepura
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants