Forums › Forums › OroPlatform › OroPlatform – Security › How to move basic Security and routes under prefix?
This topic contains 3 replies, has 2 voices, and was last updated by Mike Kudelya 7 years ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- April 10, 2017 at 3:19 am #35536
Hi, I fight with moving oroplatform under prefix. Im getting errors dont know why.
My routing.yml looks now that:
YAML1234567891011121314151617181920## ORO routes#oro_default:path: /admin/defaults:_controller: OroDashboardBundle:Dashboard:vieworo_auto_routing:prefix: /adminresource: .type: oro_autooro_expose:prefix: /adminresource: .type: oro_exposecsme:resource: "@AppBundle/Controller/"type: annotationNow my Default controller works well, but i cannot access to the admin url im getting error like this when security inside app folder is empty:
YAML1UndefinedMethodException in Manager.php line 232: Attempted to call an undefined method named "getOrganizationContext" of class "Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken"When i configure security.yml im getting errors like this issue:
Issue 53
But i cant fix it to work…Can someone help me how to setup rights security with routings i want only move oroplatform all functions under /admin and build front of application in AppBundle
Im the new in ORO,
thanks for any reply. - CreatorTopic
- AuthorReplies
- April 12, 2017 at 8:19 am #35537
Hi
My example is based on OroCRM version 1.10.18. Here is my app/config/routing.yml:
YAML123456789101112131415161718192021222324252627282930## 3rd party routes#nelmio_api_doc:resource: "@NelmioApiDocBundle/Resources/config/routing.yml"prefix: /api/docfos_js_routing:resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"_imagine:resource: .type: imagine## ORO routes#oro_default:pattern: /admin/defaults:_controller: OroDashboardBundle:Dashboard:vieworo_auto_routing:prefix: /adminresource: .type: oro_autooro_expose:resource: .type: oro_exposeand vendor/oro/platform/src/Oro/Bundle/UserBundle/Resources/config/oro/app.yml:
YAML12345678910111213141516171819202122232425262728293031323334353637383940security:providers:chain_provider:chain:providers: [in_memory, oro_user]oro_user:id: oro_user.security.providerin_memory:memory:users: []encoders:Oro\Bundle\UserBundle\Entity\User: sha512firewalls:login:pattern: ^/admin/user/(login|reset-request|send-email|check-email)$provider: chain_provideranonymous: truereset_password:pattern: ^/admin/user/reset/*provider: chain_provideranonymous: truemain:pattern: ^/admin/provider: chain_providerorganization-form-login:csrf_provider: form.csrf_providercheck_path: oro_user_security_checklogin_path: oro_user_security_loginlogout:path: oro_user_security_logoutorganization-remember-me:key: %secret%name: BAPRMlifetime: 1209600 # stay logged for two weekshttponly: trueanonymous: falseWhen i have deleted /app/cache/[dev&prod] redictories i got working application with /admin prefix.
April 12, 2017 at 11:12 am #35538Hi, im working on ORO Platform v2.1.0 and have to spend i think ~6-8h to make it worked.
I have to add 2 new firewalls new main mached “/” and other mached second secured area “/panel” when i do it i get problems with define access_list, i cant do it inside security.yml, when i add here some access_list the system was crashed, and throw errors.now my working configurations looks like this:
YAML123456789101112131415161718192021222324252627282930313233## 3rd party routes#nelmio_api_doc:resource: "@NelmioApiDocBundle/Resources/config/routing.yml"prefix: /api/docfos_js_routing:resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"_liip_imagine:resource: "@LiipImagineBundle/Resources/config/routing.xml"## ORO routes#oro_default:path: /admin/defaults:_controller: OroDashboardBundle:Dashboard:vieworo_auto_routing:prefix: /adminresource: .type: oro_autooro_expose:prefix: /adminresource: .type: oro_exposeapp:resource: "@AppBundle/Controller/"type: annotationand security:
YAML123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100security:acl:connection: defaultcache:id: security.acl.cache.doctrineprefix: sf2_acl_access_decision_manager:strategy: unanimousproviders:chain_provider:chain:providers: [in_memory, oro_user]oro_user:id: oro_user.security.providerin_memory:memory:users: []encoders:Oro\Bundle\UserBundle\Entity\User: sha512Symfony\Component\Security\Core\User\User: plaintextfirewalls:dev:pattern: ^/(_(profiler|wdt)|css|images|js)/security: falseinstall:pattern: ^/installersecurity: falseanonymous: truewsse_secured:pattern: ^/api/(rest|soap).*wsse:lifetime: 3600realm: "Secured API"profile: "UsernameToken"context: mainlogin:pattern: ^/admin/user/(login|reset-request|send-email|check-email)$provider: chain_provideranonymous: truereset_password:pattern: ^/admin/user/reset/*provider: chain_provideranonymous: trueembedded_form:pattern: ^/admin/embedded-form/(submit|success)provider: chain_provideranonymous: truetracking_data:pattern: ^/admin/tracking/data/createprovider: chain_provideranonymous: trueso_main:pattern: ^/organization-form-login:csrf_provider: security.csrf.token_managercheck_path: oro_user_security_checklogin_path: authentication_loginlogout:path: oro_user_security_logoutanonymous: truemain:pattern: ^/admin/provider: chain_providerorganization-form-login:csrf_provider: security.csrf.token_managercheck_path: oro_user_security_checklogin_path: oro_user_security_loginlogout:path: oro_user_security_logoutorganization-remember-me:key: %secret%name: RMMEADlifetime: 1209600 # stay logged for two weekshttponly: trueanonymous: falsepanel:pattern: ^/panelform_login:csrf_provider: security.csrf.token_managercheck_path: oro_user_security_checklogin_path: authentication_loginlogout:path: oro_user_security_logoutorganization-remember-me:key: %secret%name: RMMElifetime: 1209600 # stay logged for two weekshttponly: trueanonymous: falseand here i cant place next access_list, i tried copy default and extend it butt still not working, for now i use securrity annotation on controller that collect “/panel” routing but in next works i must have to configure it here,a ctualy i dont know how.
What is best practice to start app with ORO platform default application or create all own?
Thanks for reply.
April 19, 2017 at 7:29 am #35539What is best practice to start app with ORO platform default application or create all own?
I’m really sorry but I don’t fully understand the question. Would it be possible for you to give me more details on it? Are talking about platform customization?
- AuthorReplies
The forum ‘OroPlatform – Security’ is closed to new topics and replies.