David Fernandez activity https://gitlab.com/10io 2026-03-17T20:21:03Z tag:gitlab.com,2026-03-17:5214490486 David Fernandez commented on issue #588754 at GitLab.org / GitLab 2026-03-17T19:40:09Z 10io David Fernandez [email protected]

⚑ Async update

πŸš₯ Status

In review

πŸ—’οΈ Notes

Received some feedback, addressed it and πŸ“ back.

βš’οΈ MRs

/cc @crystalpoole @jaime

tag:gitlab.com,2026-03-17:5214394383 David Fernandez commented on merge request !227323 at GitLab.org / GitLab 2026-03-17T19:08:45Z 10io David Fernandez [email protected]

Thanks @mkhalifa3 ! πŸ™‡

I added a migration for existing values.

πŸ‹ back to you!

tag:gitlab.com,2026-03-17:5214394345 David Fernandez commented on merge request !227323 at GitLab.org / GitLab 2026-03-17T19:08:45Z 10io David Fernandez [email protected]

Great catch πŸ‘

Indeed, I was confused with a column default value but here, we use a jsonb attribute which has an entirely different behavior.

Thus, we need a data migration.

I didn't choose a post deployment migration because application settings (the single row) are aggressively cached and so even after executing the post deployment migration we could still be using the old value.

tag:gitlab.com,2026-03-17:5213567104 David Fernandez commented on merge request !18456 at GitLab.com / Content Sites / handbook 2026-03-17T15:35:54Z 10io David Fernandez [email protected]

Thanks @dmeshcharakou ! πŸ™‡

I think we are missing some tables in regards to the Allow/Deny feature feature in virtual repositories. Added in !18456 (629e8228)

Hum, πŸ€” don't we have a pattern_type column too? I think we want users to be able to use either wildcards or regex. We need to know which type the pattern is to handle it's validation and more importantly, its execution.

Actually, I think every time that we have to target a set of packages with user provided patterns, we need to same 3 columns:

  • pattern
  • pattern_type
  • target_field

This is for allow/deny rules but also access rules.

What do you think?

tag:gitlab.com,2026-03-17:5212743215 David Fernandez opened merge request !18924: Draft: Artifact Registry: Switch ADR 20 to OIDC at GitLab.com / Content Sites / handbook 2026-03-17T12:56:16Z 10io David Fernandez [email protected]

πŸ€” Why is this change being made?

Draft MR for https://gitlab.com/gitlab-org/gitlab/-/work_items/593722

🎩 Author and Reviewer Checklist

Please verify the check list and ensure to tick them off before the MR is merged.

  • Provided a concise title for this Merge Request (MR)
  • Added a description to this MR explaining the reasons for the proposed change, per say why, not just what
    • Copy/paste the Slack conversation to document it for later, or upload screenshots. Verify that no confidential data is added, and the content is SAFE
  • Assign reviewers for this MR to the correct
    • The when to get approval handbook section explains when DRI approval is required
    • The who can approve handbook section explains how to identify the DRI
    • If the MR does not require DRI approval, consider asking someone on your team, such as your manager.
    • The approver may merge the MR. If they approve but don't merge, you can merge.
  • For transparency, share this MR with the audience that will be impacted.
    • Team: For changes that affect your direct team, share in your group Slack channel
    • Department: If the update affects your department, share the MR in your department Slack channel
    • Division: If the update affects your division, share the MR in your division Slack channel
    • Company: If the update affects all (or the majority of) GitLab team members, post an update in #whats-happening-at-gitlab linking to this MR

Commits

  • docs: Update ADR-020 authentication flow from JWT to OIDC

Switch the Artifact Registry authentication decision from the custom JWT token exchange endpoint to a standard OIDC-based approach with per-org issuers and RFC 8693 Token Exchange.


tag:gitlab.com,2026-03-17:5212736612 David Fernandez pushed new project branch artifact-registry-ADR-authn-jwt-to-oidc at GitLab.com / Content Sites / handbook 2026-03-17T12:54:48Z 10io David Fernandez [email protected]

David Fernandez (e340ac12) at 17 Mar 12:54

docs: Update ADR-020 authentication flow from JWT to OIDC

tag:gitlab.com,2026-03-17:5212572084 David Fernandez pushed to project branch 588754-increase-vr-rate-limit at GitLab.org / GitLab 2026-03-17T12:18:33Z 10io David Fernandez [email protected]

David Fernandez (e12a185d) at 17 Mar 12:18

Add data migration

tag:gitlab.com,2026-03-17:5212120646 David Fernandez commented on issue #3 at GitLab.com / GitLab Infrastructure Team / sandbox / caproni-demo 2026-03-17T10:37:02Z 10io David Fernandez [email protected]

@splattael

Wild question here: CNG should solve the same situation, right? We have a web container and a workhorse containers running in the same pod but both need to have those shared folders.

If the above is true, then, we could check how CNG solves this.

Am I missing something?

tag:gitlab.com,2026-03-17:5212100528 David Fernandez deleted project branch 587146-update-token-locator-extract-bearer-token at GitLab.org / GitLab 2026-03-17T10:32:53Z 10io David Fernandez [email protected]

David Fernandez (57b86530) at 17 Mar 10:32

tag:gitlab.com,2026-03-17:5212097412 David Fernandez pushed to project branch master at GitLab.org / GitLab 2026-03-17T10:32:13Z 10io David Fernandez [email protected]

David Fernandez (90df0168) at 17 Mar 10:32

Merge branch '587146-update-token-locator-extract-bearer-token' int...

... and 1 more commit

tag:gitlab.com,2026-03-17:5212094577 David Fernandez accepted merge request !223673: Update auth token locator to check for scheme at GitLab.org / GitLab 2026-03-17T10:31:36Z 10io David Fernandez [email protected]

What does this MR do and why?

When working on a fix to add OAuth support to the Maven Virtual Registries Endpoints, I bumped into an issue where I was receiving a 400 error400 Bad request - Found more than one set of credentials`.

In the MR we add OAuth to the existing strategies !223674 (diffs).

The tests that are failing relate to basic auth.

When I added debug logs to trace where this is failing, and running bundle exec rspec ee/spec/requests/api/virtual_registries/packages/maven/endpoints_spec.rb -e "with a personal_access_token when sent by basic auth"we hit the token_from_namespace_inheritable method in the Authentication module.

The registered strategies that output:

 http_private_token_header => [:personal_access_token]
  http_deploy_token_header => [:deploy_token]
  http_job_token_header => [:job_token]
  http_bearer_token => [:oauth_token]
  access_token_param => [:oauth_token]
  http_basic_auth => [:personal_access_token_with_username, :deploy_token_with_username, :job_token_with_username]

The Authorization header is:

Authorization header: Basic dXNlcjI6Z2xwYXQtSERkZjEteWpPWXN...

When we iterate through the strategies to get the credentials from the request, we hit the token_locator method extract_from_http_basic_auth and get:

http_basic_auth => #<struct Gitlab::APIAuthentication::TokenLocator::UsernameAndPassword username="user2", password="xxxx">

But, as we also have the http_bearer_token strategy, and the request also has an Authorization header, we get another set of credentials. Because the extract_from_http_bearer_token doesn't check if it's the right scheme, it just extracts it.

So found ends up with 2 sets of credentials (I removed passwords from output):

[1] pry(#<#<Class:0x0000000144c74bc0>>)> found
=> {:http_bearer_token=>#<struct Gitlab::APIAuthentication::TokenLocator::UsernameAndPassword username=nil, password="xxxx">, :http_basic_auth=>#<struct Gitlab::APIAuthentication::TokenLocator::UsernameAndPassword username="user2", password="glpat-xxx">}

And we hit this error https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/api/helpers/authentication.rb#L31

Getting help from duo as to why we haven't come across this before, there are currently no other endpoints that combine http_bearer_token with http_basic_auth.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

We can validate this via the rails console.

  1. On master, start the rails console gdk rails c

  2. Testing to show that the bearer token locator will extract basic auth creds:

basic_creds = Base64.strict_encode64('myuser:mypassword')
request = OpenStruct.new(headers: { 'Authorization' => "Basic #{basic_creds}" })
locator = Gitlab::APIAuthentication::TokenLocator.new(:http_bearer_token)
result = locator.extract(request)

This will return the password:

=> #<struct Gitlab::APIAuthentication::TokenLocator::UsernameAndPassword
 username=nil,
 password="bXl1c2VyOm15cGFzc3dvcmQ=">
  1. Switch to this branch 587146-update-token-locator-extract-bearer-token and run step 2 again and nil should be returned:

Example:


[9] pry(main)> basic_creds = Base64.strict_encode64('myuser:mypassword')
=> "bXl1c2VyOm15cGFzc3dvcmQ="
[10] pry(main)> request = OpenStruct.new(headers: { 'Authorization' => "Basic #{basic_creds}" })
=> #<OpenStruct headers={"Authorization"=>"Basic bXl1c2VyOm15cGFzc3dvcmQ="}>
[11] pry(main)> locator = Gitlab::APIAuthentication::TokenLocator.new(:http_bearer_token)
=> #<Gitlab::APIAuthentication::TokenLocator:0x000000014b9051e0
 @errors=#<ActiveModel::Errors []>,
 @location=:http_bearer_token,
 @validation_context=nil>
[12] pry(main)> result = locator.extract(request)
=> nil
  1. Additional testing to test bearer tokens:
request = OpenStruct.new(headers: { 'Authorization' => 'Bearer asdfbasdf123123' })
locator = Gitlab::APIAuthentication::TokenLocator.new(:http_bearer_token)
result = locator.extract(request)
result.password

# => "asdfbasdf123123" # should return this
  1. Lower case test:
request = OpenStruct.new(headers: { 'Authorization' => 'bearer asdfbasdf123123' })
locator = Gitlab::APIAuthentication::TokenLocator.new(:http_bearer_token)
result = locator.extract(request)
result.password

# => "asdfbasdf123123" # should return this

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #587146

tag:gitlab.com,2026-03-17:5211975794 David Fernandez commented on issue #3 at GitLab.com / GitLab Infrastructure Team / sandbox / caproni-demo 2026-03-17T10:06:49Z 10io David Fernandez [email protected]

For context, on some paths we force disabled the direct upload.

A good example is all the work done around json bodies (MR example). We basically force disable the direct upload as a way to receive the request body as a temporary file in the rails side. This is useful for running JSON validations.

That's actually what the CommitsUploader is doing, hence the force disabled direct upload.

@splattael So the problem is that Rails.root is not resolved to a correct path? Is that accurate?

workhorse_local_upload_path needs to be resolved to a folder that is shared between the workhorse and the rails process. This is obvious since workhorse will write the uploaded file to it and rails will read the upload file from there.

I'm not sure if replacing Rails.root with root could be disruptive for existing workflows. As stated above, this could be impactful for the CNG conditions.

tag:gitlab.com,2026-03-17:5211866902 David Fernandez deleted project branch renovate/common-ci-tasks at GitLab.org / ops / Artifact Registry 2026-03-17T09:44:47Z 10io David Fernandez [email protected]

David Fernandez (391da443) at 17 Mar 09:44

tag:gitlab.com,2026-03-17:5211865802 David Fernandez accepted merge request !22: chore(deps): update pre-commit hook gitlab-com/gl-infra/common-ci-tasks to v3.12 at GitLab.org / ops / Artifact R... 2026-03-17T09:44:32Z 10io David Fernandez [email protected]

This MR contains the following updates:

Package Type Update Change
gitlab-com/gl-infra/common-ci-tasks repository minor v3.11 β†’ v3.12

View the Renovate pipeline for this MR

Note: The pre-commit manager in Renovate is not supported by the pre-commit maintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.


Release Notes

gitlab-com/gl-infra/common-ci-tasks (gitlab-com/gl-infra/common-ci-tasks)

v3.12

Compare Source

3.12.0 (2026-03-17)
Features
  • add Helm Chart publish task (167678d)
Dependencies
  • deps: update dependency bridgecrewio/checkov to v3.2.508 (3ad887a)
  • deps: update dependency helm/helm to v3.20.1 (2f72bd7)
  • deps: update dependency open-policy-agent/opa to v1.14.1 (651bd00)
  • deps: update dependency renovate to v43.69.0 (eb8819e)
  • deps: update dependency ruby/ruby to v3.4.9 (4d1748d)
  • deps: update ghcr.io/containerbase/base docker tag to v14.6.0 (e5fe187)
  • deps: update pre-commit hook gitlab-com/gl-infra/common-ci-tasks to v3.11 (93ebe3f)

Configuration

πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

πŸ”• Ignore: Close this MR and you won't be reminded about these updates again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

tag:gitlab.com,2026-03-17:5211865734 David Fernandez pushed to project branch main at GitLab.org / ops / Artifact Registry 2026-03-17T09:44:31Z 10io David Fernandez [email protected]

David Fernandez (059229a0) at 17 Mar 09:44

Merge branch 'renovate/common-ci-tasks' into 'main'

... and 1 more commit