FOUR-12245 customize SAML library used for the idp by devmiguelangel · Pull Request #5767 · ProcessMaker/processmaker

Conversation

@devmiguelangel

Solution

  • Customize the metadata for the SAML library

Related Tickets & Packages

FOUR-12245

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

ci:deploy
ci:next
ci:SAML_SP_DESTINATION=https://keycloak.processmaker.net/realms/pm4-next/broker/pm4-saml/endpoint

Miguel Angel added 3 commits

December 1, 2023 15:42

@tokensPM

julceslauhub

@@ -0,0 +1,21 @@
@php echo '<?xml version="1.0"?>' @endphp
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" validUntil="2027-01-20T19:04:25Z" cacheDuration="PT1485371065S" entityID="{{ url(config('samlidp.issuer_uri')) }}">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questions: What are the "validUntil" and "cacheDuration" values based on when they are generated? Can't current "hardcoded" values be generated in the code?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These variables mean

  • validUntil the expiration time of the metadata
  • cacheDuration the maximum period of time a consumer should cache the metadata

I added some functions to generate them dynamically

Miguel Angel added 2 commits

December 6, 2023 07:54

@processmaker-sonarqube

@tokensPM

caleeli

julceslauhub

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved