Skip to content

feat(credential): implement the secret process (#7882) - #358

Open
Gabriel Pezé (gabriel-peze) wants to merge 9 commits into
mainfrom
issue/7882
Open

Gabriel Pezé (gabriel-peze) wants to merge 9 commits into
mainfrom
issue/7882

Conversation

@gabriel-peze

Copy link
Copy Markdown
Contributor

Proposed changes

  • Add the process to retrieve the credentials and convert them into files and vars envs by credential types

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

@github-actions github-actions Bot added the filigran team Item from the Filigran team. label Oct 9, 2026
@gabriel-peze Gabriel Pezé (gabriel-peze) changed the title Issue/7882 feat(credential): implement the secret process (#7882) Oct 9, 2026
@Kakudou

Copy link
Copy Markdown
Member

The implementation have been done and tested in both stratus (OpenAEV-Platform/injectors#472) and prowler (OpenAEV-Platform/injectors#471).

I've added a selector 'credentials' to the contract, allowing to switch from the new creds manager to the old manual way:
image

image

i've created a creds for aws:
image

and tested it in various prowler contracts:
image

and it works:
image

@GaetanSantucci
Gaetan Santucci (GaetanSantucci) marked this pull request as ready for review October 14, 2026 16:22
Copilot AI balanced review requested due to automatic review settings October 14, 2026 16:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Redirects can disclose authorisation codes, and malformed inputs can bypass validation or error mapping.

3 open findings
What changed in this PR

Adds execution-time credential resolution to the Python client, converting platform secrets into cloud-specific environment variables and temporary files.

Changes:

  • Adds attachment resolution, typed secrets, compatibility checks, and error mapping.
  • Adds AWS, Azure, and GCP credential materialization with temporary-file cleanup.
  • Tests resolution, validation, materialization, and secret redaction.
File Description
test/​credential/​test_credential_resolved.py Tests secret parsing and compatibility.
test/​credential/​test_credential_materializer.py Tests cloud outputs and cleanup.
test/​credential/​test_credential_errors.py Tests error codes and guidance.
test/​credential/​test_credential_attachment.py Tests attachment parsing and resolution.
test/​apis/​inject/​test_inject.py Tests secret-resolution requests and failures.
test/​apis/​inject/​__init__.py Adds the test package marker.
pyoaev/​credential/​types.py Defines secret-related enums.
pyoaev/​credential/​resolved.py Adds typed secrets and validation.
pyoaev/​credential/​materializer.py Generates cloud environments and temporary files.
pyoaev/​credential/​errors.py Defines credential errors and operator guidance.
pyoaev/​credential/​attachment.py Resolves job credential attachments.
pyoaev/​credential/​__init__.py Exports credential APIs.
pyoaev/​apis/​inject.py Adds the secret-resolution endpoint method.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyoaev/apis/inject.py
# The error is raised outside of the except blocks so the original
# exception, which holds the response body, is not chained to it.
try:
result = self.openaev.http_post(path, post_data=data, **kwargs)
Comment on lines +63 to +64
if not references:
return None
``CREDENTIAL_RESOLUTION_UNAVAILABLE``. Any other failure falls back to
``CREDENTIAL_ACCESS_DENIED`` so that nothing about the credential leaks.
"""
if error_message:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team Item from the Filigran team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants