Broadleaf Microservices
  • v1.0.0-latest-prod

Auth Release Notes for 1.8.11-GA

New Features & Notable Changes

General Updates

  • Enabled "returnTo" as the targetUrlParameter in the LogoutSuccessHandler. This enables logout requests to include the URL that the user should end up at after logout. This is useful for sites where the client is on a different domain than AuthServices.

Bug Fixes

  • Fixed the pagination for the authorization servers and clients.

  • Fixed the pagination for the user roles and permissions.

  • Fixed race condition related to the declaration of customer segment ids on Auth users for rule-based customer segments. Prior to the removal of an incorrect date comparison in SegmentMemberPersistenceHandler, the id addition/removal would not be persisted to the Auth user.

New Seed Data

Permissions, Scopes, and Client for Data Feeds

Note
These changes prepare AuthenticationServices for the 'data feeds' feature, which will be generally available in a future release of Broadleaf. Clients are recommended to apply these changes now to make adoption easier.

New permissions and scopes have been added and should be inserted into the auth database with the following SQL:

-- New scopes, permissions, and role assignments
INSERT INTO blc_security_scope (id, name, open) VALUES ('-1700', 'DATA_FEED_PROCESS', 'N');
INSERT INTO blc_permission_scope (id, permission, is_permission_root, scope_id) VALUES ('-1700', 'DATA_FEED_PROCESS', 'Y', '-1700');
INSERT INTO blc_user_permission (id, archived, last_updated, name, is_account_perm, user_assignable) VALUES ('-1000', 'N', '1970-01-01 00:00:00.000000', 'ALL_DATA_FEED_PROCESS', 'N', 'Y');
INSERT INTO blc_user_permission (id, archived, last_updated, name, is_account_perm, user_assignable) VALUES ('-1010', 'N', '1970-01-01 00:00:00.000000', 'READ_DATA_FEED_PROCESS', 'N', 'Y');

INSERT INTO blc_role_permission_xref (role_id, permission_id) VALUES ('-1', '-1010');
INSERT INTO blc_role_permission_xref (role_id, permission_id) VALUES ('-2', '-1000');

-- Add client for communication between DataFeedServices and other services
INSERT INTO blc_client (id, application_id, attributes, client_id, client_secret, friendly_name, is_admin, auth_server_id, token_timeout_seconds, default_redirect_uri, refresh_token_rot_intrvl_scnds, refresh_token_timeout_seconds, reset_password_base_uri) VALUES ('datafeedclient', null, '{}', 'datafeedclient', 'TODO MY SECRET', 'Data Feed Service Client', 'N', '2', 300, null, 60, 7200, null);

INSERT INTO blc_client_grant_types (id, grant_type) VALUES ('datafeedclient', 'client_credentials');

INSERT INTO blc_client_permissions (id, permission) VALUES ('datafeedclient', 'READ_RATING_DETAIL');
INSERT INTO blc_client_permissions (id, permission) VALUES ('datafeedclient', 'READ_PRODUCT_IGNORE_NARROWING');
INSERT INTO blc_client_permissions (id, permission) VALUES ('datafeedclient', 'READ_PRICE_LIST');
INSERT INTO blc_client_permissions (id, permission) VALUES ('datafeedclient', 'READ_CONSOLIDATED_INVENTORY_AVAILABILITY');
INSERT INTO blc_client_permissions (id, permission) VALUES ('datafeedclient', 'READ_INVENTORY');

INSERT INTO blc_client_scopes (id, scope) VALUES ('datafeedclient', 'INVENTORY');
INSERT INTO blc_client_scopes (id, scope) VALUES ('datafeedclient', 'PRICE_LIST');
INSERT INTO blc_client_scopes (id, scope) VALUES ('datafeedclient', 'CONSOLIDATED_INVENTORY_AVAILABILITY');
INSERT INTO blc_client_scopes (id, scope) VALUES ('datafeedclient', 'RATING_DETAIL');
INSERT INTO blc_client_scopes (id, scope) VALUES ('datafeedclient', 'PRODUCT_IGNORE_NARROWING');

If you’re consuming the openapi client for use with OpenAPI, the following permission updates are necessary:

INSERT INTO blc_client_scopes (id, scope) VALUES ('openapi', 'DATA_FEED_PROCESS');
INSERT INTO blc_client_permissions (id, permission) VALUES ('openapi', 'ALL_DATA_FEED_PROCESS');