Skip to content

Conversation

mehmet-yoti
Copy link
Contributor

To address the requirement of enabling Relying Parties to easily request the estimated_age attribute with a fallback to the date_of_birth attribute from Digital ID app shares, we need to implement helper methods in the SDKs. Here is a detailed implementation plan:

Implementation Plan

1. Understand the Requirement and Constraints

  • Review the structure of the share policy to understand how the estimated_age and date_of_birth attributes are requested within the Digital ID app framework.
  • Understand the derivation field, specifically focusing on:
    • The interpretation of age_over:18:5.
    • Maximum values handled by the system: 99 for age of interest, 20 for buffer.
  • Learn the current SDK architecture to determine where to integrate new helper methods.

2. Design Helper Methods

  • Objective: Allow Relying Parties to request attributes easily with clear fallbacks using minimal and intuitive API interactions.
  1. Define Method Signatures:

    • getEstimatedAgeOrDOB(int ageOfInterest, int buffer)
    • Example implementation language: Java, Python, JavaScript, etc., depending on SDKs currently supported.
  2. Determine Return Types:

    • Ensure compatibility with existing data structures.
    • Document return types clearly (e.g., EstimatedAgeResult object containing the requested age or date of birth data).
  3. Decide on Error Handling:

    • Establish clear error codes or exceptions for scenarios such as attributes unavailable, exceeding policy constraints, etc.

3. Implement the Features

  • Select SDKs for Implementation: Determine priority language SDKs (e.g., Java, Python) based on user base and integration needs.
  • Write Code for Helper Methods: Implement logic using share policy logic to derive attributes.
    • Check Availability: Implement logic to check for estimated_age availability first, then fallback to date_of_birth.
    • Apply Derivation: Implement derivation calculations of age_over logic.
    • Handle Buffer Calculations: Ensure the buffer years are applied correctly.

4. Integrate into SDK

  • Code Integration: Insert new helper methods into relevant SDK modules or classes.
  • Maintain Documentation: Update SDK documentation to include new methods, parameters, and example usage.
  • Testing and Validation:
    • Unit tests: Write comprehensive tests covering various scenarios—both when attributes are available and when they are not.
    • Integration tests: Validate interactions with Digital ID app when embedded in a larger system.
    • Boundary tests: Specifically test edge cases for maximum age and buffer values.

5. Quality Assurance and Review

  • Code Review: Conduct peer reviews focusing on coding standards, logic correctness, and adherence to policy constraints.
  • Manual Testing: Manually test helper methods in live scenarios mimicking partner integrations.

6. Deployment and Communication

  • Deploy Updated SDKs: Roll out new SDK versions through standard deployment channels (e.g., Maven, PyPI, npm).
  • Notify Stakeholders: Communicate with Relying Parties about new capabilities, highlighting changes in release notes.

7. Feedback and Iteration

  • Collect Feedback: Gather user feedback for improvement.
  • Plan Iterative Enhancements: Consider additional feature requests or modifications based on user needs and technological changes.

By maintaining clear structure and organization in this plan, software engineers will be able to effectively implement and deploy the necessary changes to streamline the attribute request process for Relying Parties.

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

Successfully merging this pull request may close these issues.

1 participant