Skip to content

fix: bound task creation, log registry tokens #364

Closed

Description

@uniqueg

Low findings of the pre-release review of 0.4.0 that concern code.

Problems

  1. Registries missing from the startup log of token recipients. pro_tes/security.py logs "TES backends with access tokens of proTES", but leaves out service registries, whose verified TES instances get the same client-credentials token (entries default to auth: client_credentials). Operators can't see from the log that services chosen by the registry's admins get the token.
  2. POST /tasks can outlast a 60 s proxy budget. Only the connect timeout of each forwarding attempt is cut to the time left (attempt.remaining()); the create read and the follow-up get_task each use custom.tes.timeout (15 s), plus up to 5 s to connect for the latter. With FOCA's default plugins.defaults.forward_timeout of 60 s, a request can take about 60 + 15 + 5 + 15 = 95 s, beyond the 60 s read timeout of common reverse proxies (e.g., ingress-nginx), which the docs ask to stay below. The client then gets a 504 and may create the task twice on retry.

Proposed fix

  1. Log the registry entries (with their auth) in that line, or in one next to it.
  2. Set plugins.defaults.forward_timeout in the base config (and so the chart) so that forward_timeout + tes.timeout + 5 + tes.timeout stays within 60 s with the defaults, and document the combined bound; test it.

Acceptance criteria

  • The startup log names registries whose instances get proTES' token.
  • A test checks that the defaults keep task creation within 60 s; docs state the bound.

Activity

  1. added this to the v0.4.0 milestone on Oct 31, 2026
  2. added
    priority: medium
    status: triage
    type: bug
    workload: hours
    status: in progress
    and removed
    status: triage
    on Oct 31, 2026
  3. removed
    status: in progress
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumtype: bugworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions