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

LPS-197124 - Cookies PreAction setup #3892

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

juanjofgliferay
Copy link
Collaborator

@juanjofgliferay juanjofgliferay commented Dec 12, 2023

On hold: #3892 (comment)


Issue

Liferay allows users to configure how they want to handle their cookies preferences, letting the platform to store information based on 4 different cookie groups: Necessary, Functional, Performance and Personalization cookies. However, Liferay uses cookies to store the cookie information 🤷 . Actually, those cookies, considered Necessary, are not created until the users confirm their preferences.

We need to setup those basic cookies no matter when a user confirms (or not) cookie preferences. To setup the basic cookies we need to consider some scenarios:

1 - First access
Setup basic cookies configuration.

NECESSARY_COOKIES = true
FUNCTIONAL_COOKIES = false
PERFORMANCE_COOKIES = true
PERSONALIZATION_COOKIES = true

2 - Based on Cookies Preference handling options
image

2a - Both options enabled
Setup basic cookies configuration (1) or load stored cookie preferences

2b - Preference handling enabled / Explicit consent mode disabled
Setup basic cookies configuration (1) or load stored cookie preferences

2c - Preference handling disabled / Explicit consent mode enabled
Setup basic cookies configuration (1), remove stored cookie preferences if any

2d - Both options disabled
Setup basic cookies configuration (1) or load stored cookie preferences

All this cookies NECESSARY, FUNCTIONAL, PERFORMANCE & PERSONALIZATION
belongs to the necessary cookies group.
Handle its value depending on the user Cookie preference configuration
Only remove the cookie that remembers if users had configured
cookies configuration modal
@liferay-continuous-integration
Copy link
Collaborator

CI is automatically triggering the following test suites:

  •     ci:test:sf

@liferay-continuous-integration
Copy link
Collaborator

❌ ci:test:sf - 0 out of 1 jobs passed in 4 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: ad700a7ff309d37e95901d678e16b6e56d2b0f84

Sender Branch:

Branch Name: LPS-197124
Branch GIT ID: e8513197798fde9196735344ef1022fca112a3be

0 out of 1jobs PASSED
For more details click here.
     [java] java.lang.Exception: Found 8 formatting issues:
     [java] 1: > 80: ./modules/apps/cookies/cookies-impl/src/main/java/com/liferay/cookies/internal/manager/CookiesManagerImpl.java 219 (SourceCheck:JavaLongLinesCheck)
     [java] 2: > 80: ./modules/apps/cookies/cookies-impl/src/main/java/com/liferay/cookies/internal/manager/CookiesManagerImpl.java 248 (SourceCheck:JavaLongLinesCheck)
     [java] 3: > 80: ./modules/apps/cookies/cookies-impl/src/main/java/com/liferay/cookies/internal/manager/CookiesManagerImpl.java 253 (SourceCheck:JavaLongLinesCheck)
     [java] 4: > 80: ./modules/apps/cookies/cookies-impl/src/main/java/com/liferay/cookies/internal/manager/CookiesManagerImpl.java 268 (SourceCheck:JavaLongLinesCheck)
     [java] 5: > 80: ./modules/apps/cookies/cookies-impl/src/main/java/com/liferay/cookies/internal/manager/CookiesManagerImpl.java 269 (SourceCheck:JavaLongLinesCheck)
     [java] 6: Variable 'hasConsentTypeFunctionalCookie' is unused: ./modules/apps/cookies/cookies-impl/src/main/java/com/liferay/cookies/internal/manager/CookiesManagerImpl.java 568 (Checkstyle:UnusedVariableCheck)
     [java] 7: Variable 'hasConsentTypePerformanceCookie' is unused: ./modules/apps/cookies/cookies-impl/src/main/java/com/liferay/cookies/internal/manager/CookiesManagerImpl.java 572 (Checkstyle:UnusedVariableCheck)
     [java] 8: Variable 'hasConsentTypePersonalizationCookie' is unused: ./modules/apps/cookies/cookies-impl/src/main/java/com/liferay/cookies/internal/manager/CookiesManagerImpl.java 576 (Checkstyle:UnusedVariableCheck)
     [java] 
     [java]   at com.liferay.source.formatter.SourceFormatter.format(SourceFormatter.java:458)
     [java]   at com.liferay.source.formatter.SourceFormatter.main(SourceFormatter.java:291)
[stopwatch] [run.batch.test.action: 1:47.394 sec]
     [echo] The following error occurred while executing this line:
     [echo] /opt/dev/projects/github/liferay-portal/portal-impl/build.xml:504: The following error occurred while executing this line:
     [echo] /opt/dev/projects/github/liferay-portal/portal-impl/build.xml:648: Java returned: 1
      [get] Getting: http://test-1-1/job/test-portal-source-format/3543//consoleText
      [get] To: /opt/dev/projects/github/liferay-portal/20231212074507797.txt
   [delete] Deleting: /opt/dev/projects/github/liferay-portal/20231212074507797.txt
  [typedef] Could not load definitions from resource org/apache/maven/artifact/ant/antlib.xml. It could not be found.

@liferay-continuous-integration
Copy link
Collaborator

@juanjofgliferay juanjofgliferay marked this pull request as ready for review December 19, 2023 07:30
@juanjofgliferay
Copy link
Collaborator Author

ci:test:sf

@liferay-continuous-integration
Copy link
Collaborator

✔️ ci:test:sf - 1 out of 1 jobs passed in 4 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 401e2fa3ed32b578dccd9ae073abcd4024bb7c94

Sender Branch:

Branch Name: LPS-197124
Branch GIT ID: 5e28876ae602759a9b63bd1f4321e0c010a268f7

1 out of 1jobs PASSED
1 Successful Jobs:
For more details click here.

@liferay-continuous-integration
Copy link
Collaborator

@dsanz
Copy link
Collaborator

dsanz commented Jan 30, 2024

put on hold till we resolve conversation with app-sec team

@herrardo
Copy link
Collaborator

put on hold till we resolve conversation with app-sec team

@dsanz @juanjofgliferay Is this something we are strill waiting on? Or we have just forgot about it?

Thanks

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

Successfully merging this pull request may close these issues.

4 participants