Skip to content

Cannot make this working due to do not know how to configure it #72

Open
@Bloodsucker

Description

@Bloodsucker

I am doing a web project with symfony2 that involves a CAS server: http://www.jasig.org/cas unfortunately I cannot make it working. I have tried several configurations and anything of what I do is correct. This is the flux that I am expecting to do for any user that wants to be logged:

  1. A user wants to login in my system
  2. My system redirects somehow the users to the cas server login web page to login with user credentials.
  3. After a valid login, cas server login webpage redirects user back to my system.
  4. My system knows if the user is well logged or not based on protocol mechanisms.

Following your instructions from the rep, here are all my configurations:

For the config.yml

be_simple_sso_auth:
    admin_sso:
        protocol:
            id: cas
            version: 2
        server:
            id: cas
            login_url: https://cas_server.fi/cas/login
            validation_url: https://cas_server.fi/cas/serviceValidate

For the security.yml

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

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]

    providers:
        in_memory:
            memory:
                users:
                    user:  { password: userpass, roles: [ 'ROLE_USER' ] }
                    admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false
        my_firewall:
            pattern: ^/
            anonymous: ~
            trusted_sso:
                manager: admin_sso
                login_action: false
                create_users: true
                created_users_roles: [ROLE_ADMIN]
                check_path: /

The cas server provided me two .crt files that I have already installed in my Ubuntu 13.10. Or at least I what I think... however any of this previous configurations do not seem to want these certificates since I cannot specify where the bundle can find them. Anyway it does not work yet so this step maybe is irrelevant.

So, what happens now is the next:

  1. User access to / for first time
  2. My system redirect him to /login (as far as I understand it is the default direction...)

To manage this /login I have in routing.yml in my own bundle:

ss_web_login:
    path: /login
    defaults: { _controller: BeSimpleSsoAuthBundle:TrustedSso:login }

I have checked this controller and it looks like it draws an anchor to "somewhere" (I guess is the login form of my cas server.

Let's continue... as I said, the user is being redirected to /login but I get an error:

Controller "BeSimple\SsoAuthBundle\Controller\TrustedSsoController::loginAction()" requires that you provide a value for the "$manager" argument (because there is no default value or because there is a non optional argument after this one).

It happens because the BeSimpleSsoAuthBundle:TrustedSso:login expects different parameters:

public function loginAction(Manager $manager, Request $request, AuthenticationException $exception = null)

But nobody is passing these parameters that it expects. What should I do?

Please, if you have ANY other suggestion about make this working I will really appreciate.

Thank you so much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions