Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backports and gomod dependency updates (stable-5.21) #13244

Merged
merged 32 commits into from
Apr 2, 2024

Commits on Apr 2, 2024

  1. test/lint/client-imports: rename godeps.list file

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    2c2f513 View commit details
    Browse the repository at this point in the history
  2. test/lint/client-imports: export LC_ALL for predictable sorting

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    9fc35bf View commit details
    Browse the repository at this point in the history
  3. test/lint: add lxd-agent-imports

    Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
    simondeziel authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    8a371ca View commit details
    Browse the repository at this point in the history
  4. gitignore: Ignore all .bak

    Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
    MggMuggins authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    7c989fb View commit details
    Browse the repository at this point in the history
  5. shared/api: Fix typo

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    9689f89 View commit details
    Browse the repository at this point in the history
  6. lxd/api_metrics: Check individual project permissions if set

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    5ea61b2 View commit details
    Browse the repository at this point in the history
  7. lxd/metrics: Use label aware permission check when filtering samples

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    fdaeef9 View commit details
    Browse the repository at this point in the history
  8. lxd/api_metrics: Filter metrics by looping only once

    This way we can apply multiple filters on internal server and project metrics at once.
    Additionally this ensures that entity URLs are always called with the right type.
    Otherwise this will raise a warning for every sample.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    fa6116e View commit details
    Browse the repository at this point in the history
  9. lxd/auth/driver_tls: Allow viewing metrics for unrestricted metrics c…

    …erts
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    645d832 View commit details
    Browse the repository at this point in the history
  10. lxd/db/cluster: Add identityTypeCertificateMetricsRestricted and iden…

    …tityTypeCertificateMetricsUnrestricted
    
    This effectively replaces identityTypeCertificateMetrics with identityTypeCertificateMetricsRestricted
    and adds the new type identityTypeCertificateMetricsUnrestricted.
    
    By replacing identityTypeCertificateMetrics with identityTypeCertificateMetricsRestricted
    we ensure that restricted metrics certificates that were falsely moved to identityTypeCertificateMetrics
    are still considered to be secure.
    
    On the other side this marks unrestricted certificates as restricted by default.
    This has to be manually modified by unrestricting the respective metrics certficiate.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    5e5f4e9 View commit details
    Browse the repository at this point in the history
  11. lxd/db/cluster/identities: Handle unrestricted metrics certificates

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    e5d4476 View commit details
    Browse the repository at this point in the history
  12. shared/api/auth: Replace IdentityTypeCertificateMetrics with a restri…

    …cted and unrestricted type
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    1be949f View commit details
    Browse the repository at this point in the history
  13. lxd/daemon: Use IdentityTypeCertificateMetricsRestricted and Identity…

    …TypeCertificateMetricsUnrestricted
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    fe6b6ba View commit details
    Browse the repository at this point in the history
  14. lxd/db/cluster/certificates: Use IdentityTypeCertificateMetricsRestri…

    …cted and IdentityTypeCertificateMetricsUnrestricted
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    1a60684 View commit details
    Browse the repository at this point in the history
  15. lxd/identity: Use IdentityTypeCertificateMetricsRestricted and Identi…

    …tyTypeCertificateMetricsUnrestricted
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    024c122 View commit details
    Browse the repository at this point in the history
  16. lxd/auth/openfga: Extend can_view_metrics entitlement to projects

    This allows granting the can_view_metrics entitlement on specific projects
    so that requests to the metrics endpoint containing the project query parameter
    only return the respective project's metrics.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    f4db647 View commit details
    Browse the repository at this point in the history
  17. lxd/db/cluster/update: Fix updateFromV69

    Ensure that restricted certificates are mapped to IdentityTypeCertificateMetricsRestricted and vice versa.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    da71678 View commit details
    Browse the repository at this point in the history
  18. test/suites/auth: Update test to account for can_view_metrics

    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    aab49aa View commit details
    Browse the repository at this point in the history
  19. test/suites/metrics: Add restricted and unrestricted certificate tests

    Additionally check the responses if the endpoint gets queried using the project parameter
    as this is producing different results for restricted and unrestricted metrics certificates.
    
    Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
    roosterfish authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    9c3d5d2 View commit details
    Browse the repository at this point in the history
  20. shared: Return new structure from ParseLXDFileHeaders

    In preparation for canonical#13193; makes it less gross to return additional
    fields.
    
    This also allows ParseLXDFileHeaders to return error and validates
    the values of the `X-LXD-*` headers
    
    Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
    MggMuggins authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    7896e0a View commit details
    Browse the repository at this point in the history
  21. lxd: Refactor calls to shared.ParseLXDFileHeaders

    Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
    MggMuggins authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    3d8cbf0 View commit details
    Browse the repository at this point in the history
  22. client: Refactor calls to shared.ParseLXDFileHeaders

    Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
    MggMuggins authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    62da816 View commit details
    Browse the repository at this point in the history
  23. api: Add instances_files_modify_permissions extension

    Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
    MggMuggins authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    619ae2a View commit details
    Browse the repository at this point in the history
  24. shared: Parse X-LXD-modify-perm header

    Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
    MggMuggins authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    52699b3 View commit details
    Browse the repository at this point in the history
  25. lxd: Allow setting permissions for existing files via API

    Implements the `instances_files_permissions` api extension
    
    Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
    MggMuggins authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    3e75d74 View commit details
    Browse the repository at this point in the history
  26. client: Send X-LXD-modify-perm on file POST

    Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
    MggMuggins authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    9cfde0e View commit details
    Browse the repository at this point in the history
  27. lxc/file: Set ModifyExisting when --mode, --uid, or --gid are passed

    Fixes canonical#12724
    
    Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
    MggMuggins authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    b64aa4b View commit details
    Browse the repository at this point in the history
  28. doc: Run make update-api

    Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
    MggMuggins authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    a6d61cf View commit details
    Browse the repository at this point in the history
  29. gomod: Update dependencies

    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    061b563 View commit details
    Browse the repository at this point in the history
  30. incusd/instance/qemu: Set auto-converge on all migrations

    Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
    (cherry picked from commit 26ea414cf2fcc70101d929cb42b180a77825de31)
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    License: Apache-2.0
    stgraber authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    91bf8fa View commit details
    Browse the repository at this point in the history
  31. incusd/device/disk: Remove bad comment

    Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
    (cherry picked from commit 19e428ced76907c21fd2eb19f8e34a848b09fa7e)
    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    License: Apache-2.0
    stgraber authored and tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    7002db0 View commit details
    Browse the repository at this point in the history
  32. lxc/config/default: Add images remote for images.lxd.canonical.com

    Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
    tomponline committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    7d3ae3e View commit details
    Browse the repository at this point in the history