Skip to content

Commit 1f79d3f

Browse files
authored
BAP-20198: Remove WSSE authentication (#40279)
1 parent ec3f4de commit 1f79d3f

File tree

15 files changed

+16
-210
lines changed

15 files changed

+16
-210
lines changed

api/authentication/index.rst

-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ Out-of-the-box, OroPlatform provides the following authentication mechanism:
1313
:maxdepth: 1
1414

1515
oauth
16-
wsse
17-
18-
.. important::
19-
20-
Please note that WSSE authentication is deprecated and will be removed in one of the future LTS releases.
21-
Use :ref:`OAuth authentication<web-services-api--authentication--oauth>` instead.
2216

2317

2418
.. admonition:: Business Tip

api/authentication/wsse.rst

-145
This file was deleted.

api/sandbox.rst

-4
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ case, entity data will be in the JSON format. Find more information on this form
8080
The **Curl Command Line** section contains an example of the CLI command to perform the request
8181
with |Curl|. This command may help emulate the real request to the API.
8282

83-
.. important::
84-
85-
When performing Curl requests and using WSSE authentication, please ensure that your **X-WSSE** header is up to date for each request.
86-
8783
*Edit a Record*
8884

8985
To edit a record for a particular resource record with JSON:API, perform the PATCH method with the specified id parameter:

backend/api/firewall-authenticators.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ Configure Feature Depended Firewall Authenticators
44
==================================================
55

66
API can be enabled or disabled via the system configuration. When the API is disabled, the API-related security firewalls
7-
should not use some authorization authenticators, for example, WSSE and OAuth authorization should be disabled.
7+
should not use some authorization authenticators, for example, OAuth authorization should be disabled.
88

99
To be able to configure authenticators for a disabled API feature, use the following configuration:
1010

1111
.. code-block:: yaml
1212
1313
oro_api:
1414
api_firewalls:
15-
api_wsse_secured: # firewall name
15+
api_test_secured: # firewall name
1616
feature_name: web_api
1717
feature_firewall_authenticators: # list of authenticators that should be disabled when the feature specified in feature_name option is disabled
18-
- Oro\Bundle\WsseAuthenticationBundle\Security\Core\Authentication\WsseAuthenticator
19-
wsse_secured:
18+
- Oro\Bundle\TestBundle\Security\Core\Authentication\SomeAuthenticator
19+
test_secured:
2020
feature_name: web_api
2121
feature_firewall_authenticators:
22-
- Oro\Bundle\WsseAuthenticationBundle\Security\Core\Authentication\WsseAuthenticator
22+
- Oro\Bundle\TestBundle\Security\Core\Authentication\SomeAuthenticator
2323
api_options:
2424
feature_name: web_api
2525

backend/api/headers.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The following example shows how to get the total number of accounts:
99

1010
.. code-block:: none
1111
12-
curl "http://orocrm.loc/index_dev.php/api/accounts?page=1&limit=2" -v --header="X-Include:totalCount" --header="X-WSSE:..."
12+
curl "http://orocrm.loc/index_dev.php/api/accounts?page=1&limit=2" -v --header="X-Include:totalCount" --header="..."
1313
1414
The corresponding response:
1515

@@ -20,7 +20,6 @@ The corresponding response:
2020
< X-Include-Total-Count: 67
2121
...
2222

23-
.. hint:: To generate a WSSE header, run: ``php bin/console oro:wsse:generate-header YOUR_API_KEY``.
2423

2524
.. _existing-x-include-keys:
2625

backend/api/security.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Configure Stateless Security Firewalls
55

66
The Symfony framework allows for the creation of stateless firewalls. In this case, the security token is not serialized for a session.
77

8-
However, when API calls are utilized in AJAX requests from the UI, the user's token data from the current session must be used instead of the firewall credentials (e.g., WSSE headers). For this purpose, the firewall should have the |context1| parameter with the context name that the system can use to authenticate the user.
8+
However, when API calls are utilized in AJAX requests from the UI, the user's token data from the current session must be used instead of the firewall credentials. For this purpose, the firewall should have the |context1| parameter with the context name that the system can use to authenticate the user.
99

1010
For example:
1111

backend/automated-tests/functional.rst

+1-9
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ In this example, a user without sufficient permissions is trying to access a con
521521
$this->getUrl('oro_api_get_users'),
522522
['limit' => 100],
523523
[],
524-
$this->generateWsseAuthHeader(LoadUserData::USER_NAME, LoadUserData::USER_API_KEY)
524+
$this->generateApiAuthHeader(LoadUserData::USER_NAME)
525525
);
526526
$result = $this->client->getResponse();
527527
$this->assertJsonResponseStatusCodeEquals($result, 403);
@@ -538,7 +538,6 @@ Here is an example of a fixture that adds a user without permissions:
538538
use Doctrine\Common\DataFixtures\AbstractFixture;
539539
use Doctrine\Persistence\ObjectManager;
540540
use Oro\Bundle\UserBundle\Entity\Role;
541-
use Oro\Bundle\UserBundle\Entity\UserApi;
542541
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
543542
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
544543
@@ -564,12 +563,6 @@ Here is an example of a fixture that adds a user without permissions:
564563
// Creating new user
565564
$user = $userManager->createUser();
566565
567-
// Creating API entity for user, we will reference it in testGetUsersAPI method,
568-
// if you are not going to test API you can skip it
569-
$api = new UserApi();
570-
$api->setApiKey(self::USER_API_KEY)
571-
->setUser($user);
572-
573566
// Creating user
574567
$user
575568
->setUsername(self::USER_NAME)
@@ -578,7 +571,6 @@ Here is an example of a fixture that adds a user without permissions:
578571
->setLastName('User')
579572
->addRole($role)
580573
->setEmail('[email protected]')
581-
->setApi($api)
582574
->setSalt('');
583575
584576
// Handle password encoding

bundles/platform/EmbeddedFormBundle/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This bundle has the following configuration options:
1616
# The number of seconds the CSRF token should live for.
1717
csrf_token_lifetime: 3600
1818
# The service id that is used to cache CSRF tokens.
19-
# If not specified the Oro\Bundle\SecurityBundle\Cache\WsseNoncePhpFileCache
19+
# If not specified the oro_embedded_form.csrf_token_cache service
2020
# will be used that stores data in %kernel.cache_dir%/security/embedded_form
2121
csrf_token_cache_service_id: ~
2222

bundles/platform/RedisConfigBundle/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ OroRedisConfigBundle
77

88
|OroRedisConfigBundle| provides configuration enhancements for Oro applications to enable usage of |Redis| for caching.
99

10-
The bundle enables developers to set Redis parameters in the application configuration YAML files and after that automatically enables and configures Redis caching services for different types of application caches (Doctrine cache, file cache, wsse_nonces cache, etc.) based on these parameters.
10+
The bundle enables developers to set Redis parameters in the application configuration YAML files and after that automatically enables and configures Redis caching services for different types of application caches (Doctrine cache, file cache, etc.) based on these parameters.
1111

1212
.. admonition:: Business Tip
1313

@@ -38,4 +38,4 @@ Resources
3838
:start-after: begin
3939

4040
.. include:: /include/include-links-seo.rst
41-
:start-after: begin
41+
:start-after: begin

code_examples/commerce/demo/Resources/config/oro/app.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ oro_website_search:
9595

9696
oro_organization_pro:
9797
ignore_preferred_organization_tokens:
98-
- cme\Bundle\DemoBundle\Security\AcmeWsseToken
98+
- Acme\Bundle\DemoBundle\Security\AcmeCustomToken
9999

100100
oro_sanitize:
101101
# Custom email domain for the 'email' sanitizing rule

code_examples/commerce/demo/Security/AcmeWsseToken.php

-21
This file was deleted.

developer/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ Developer Documentation is intended for developers and contains information abou
5656
* Create a third-party integration through the OroIntegrationBundle
5757
* Create Twig email templates with certain pre-defined placeholders to define template metadata
5858
* Run regular time-based background tasks through cronjobs (on UNIX-based operating systems) or the Windows task scheduler
59-
* Use REST API and WSSE Authentication to integrate Oro functionality into third-party software systems
59+
* Use REST API and OAuth 2.0 to integrate Oro functionality into third-party software systems
6060

include/include-links-dev.rst

-8
Original file line numberDiff line numberDiff line change
@@ -2853,14 +2853,6 @@ Links (Dev)
28532853

28542854
<a href="https://oauth.net/2/grant-types/password/" target="_blank">OAuth 2.0 Password Grant</a>
28552855

2856-
.. |WSSE specification| raw:: html
2857-
2858-
<a href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0.pdf" target="_blank">WSSE specification</a>
2859-
2860-
.. |OroWsseAuthenticationBundle| raw:: html
2861-
2862-
<a href="https://github.com/oroinc/platform/tree/master/src/Oro/Bundle/WsseAuthenticationBundle" target="_blank">OroWsseAuthenticationBundle</a>
2863-
28642856
.. |Curl| raw:: html
28652857

28662858
<a href="https://curl.haxx.se/" target="_blank">Curl</a>

redirects.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ user/back-office/system/integrations/outlook/sync-flow /user/back-office/system/
5555
user/concept-guides/highlight-products/all-products /user/concept-guides/product-management
5656
user/concept-guides/pricing/pricing-overview /user/concept-guides/pricing
5757
backend/api/using/advanced-search /api/advanced-search
58-
backend/api/using/how-to-use-wsse-authentication /api/authentication/wsse
5958
backend/api/using/simple-search /api/simple-search
6059
concept-guides/highlight-products/featured /user/back-office/system/configuration/commerce/product/global-featured-products
6160
user/back-office/system/integrations/outlook/create-lead-opp-case /user/back-office/system/integrations
@@ -462,4 +461,4 @@ user/back-office/system/configuration/commerce/customer/global-consents /user/ba
462461
user/back-office/system/configuration/commerce/customer/global-contact-us /user/back-office/system/configuration/commerce/customer/global-interactions
463462
user/back-office/system/user-management/organizations/org-configuration/commerce/customers/organization-contact-us /user/back-office/system/user-management/organizations/org-configuration/commerce/customers/organization-interactions
464463
user/back-office/system/websites/web-configuration/commerce/customers/website-consents /user/back-office/system/websites/web-configuration/commerce/customers/website-interactions
465-
user/back-office/system/websites/web-configuration/commerce/customers/website-contact-us /user/back-office/system/websites/web-configuration/commerce/customers/website-interactions
464+
user/back-office/system/websites/web-configuration/commerce/customers/website-contact-us /user/back-office/system/websites/web-configuration/commerce/customers/website-interactions

user/back-office/system/configuration/system/integrations/microsoft-settings/microsoft-oauth-azure.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Configure Microsoft 365 OAuth Integration (Azure Active Directory Application)
44
==============================================================================
55

6-
Integration with Microsoft 365 via OAuth 2 API enables users to log in with their Microsoft 365 account and connect their mailbox to the Oro application using OAuth authentication.
6+
Integration with Microsoft 365 via OAuth 2.0 API enables users to log in with their Microsoft 365 account and connect their mailbox to the Oro application using OAuth 2.0 authentication.
77
To achieve this, you need to register a custom Azure application and connect it with your Oro application.
88

99
Register an Application in Azure
@@ -140,4 +140,4 @@ For that:
140140

141141

142142
.. include:: /include/include-links-user.rst
143-
:start-after: begin
143+
:start-after: begin

0 commit comments

Comments
 (0)