Skip to content

Permify integration #1068

Closed as not planned
Closed as not planned

Description

@dealloc

.NET Aspire issue link

No response

Overview

Support for Permify in Aspire

Usage example

var permify = builder.AddPermify()
    .WithDatabase(database);

// using
builder.AddProject<Example>("example")
    .WithReference(permify);

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item

Activity

  1. aaronpowell commented on Dec 16, 2025

    @aaronpowell
    Member

    Sounds like a good companion to the auth choices available with Keycloak and the proposed OpenFGA (#1043) integration.

    Consider how the config would be managed - is there a .NET object model that exists (maybe the SDK?) for the YAML config file, otherwise, how would the database be effectively provided from the PostgreSQL resource to the Permify container.

  2. dealloc commented on Dec 17, 2025

    @dealloc
    ContributorAuthor

    I'm writing a .NET client right now over at dealloc/permify-client, for the Aspire example I'm currently using the following code:

    var postgres = builder.AddPostgres("postgres")
        .WithArgs("-c", "track_commit_timestamp=on")
        .AddDatabase("permify-db");
    
    var permify = builder.AddContainer("permify", "permify/permify")
        .WithImageTag("latest")
        .WithImageRegistry("ghcr.io")
        .WithHttpEndpoint(targetPort: 3476, name: "http")
        .WithHttpEndpoint(targetPort: 3478, name: "grpc")
        .WithHttpHealthCheck("/healthz")
        .WithEnvironment("PERMIFY_DATABASE_ENGINE", "postgres")
        .WithEnvironment("PERMIFY_DATABASE_URI", postgres.Resource.UriExpression)
        .WithEnvironment("PERMIFY_SERVICE_WATCH_ENABLED", "true");

    The track_commit_timestamp is optional and only required when using the watch service.
    If you don't pass in the postgres bit it just runs entirely in-memory (but it won't persist and the watch service doesn't work as it relies on Postgres for notifications).

    I think the only thing I'd have to look into (but I'm sure you guys know this off the top of your head) is that Permify exposes 2 endpoints, a HTTP one and gRPC one and preferably I'd inject both with just .WithReference(permify) rather than the WithHttpEndpoint I'm doing now.

    My clienta side there's I think around 2 other clients that could be used, though I don't know how well they integrate with Aspire as-is.

  3. aaronpowell commented on Dec 17, 2025

    @aaronpowell
    Member

    What about the config file described here? How much of that can be modelled in the app host or should people be expected to write a YAML file that it consumes?

    For providing the endpoints to a client, that's easily done using a connection string and just defining a custom format that you want to consume.

  4. dealloc commented on Dec 18, 2025

    @dealloc
    ContributorAuthor

    All YAML configuration can be passed as environment variables by prefixing with PERMIFY_ and uppercasing everything.

    so the Yaml path service.watch.enabled would become PERMIFY_SERVICE_WATCH_ENABLED (which I actually have in my previous example).

    as far as I'm aware, no yaml required :)

  5. dealloc commented on Dec 19, 2025

    @dealloc
    ContributorAuthor

    @aaronpowell when making a PR, do I target main or aspire-13.1 like in #1021 ?

  6. github-actions commented on Jan 10, 2026

    @github-actions
    Contributor

    We have noticed this issue has not been updated within 21 days. If there is no action on this issue in the next 14 days, we will automatically close it. You can use /stale-extend to extend the window.

  7. dealloc commented on Jan 10, 2026

    @dealloc
    ContributorAuthor

    /stale-extend

  8. aaronpowell commented on Jan 12, 2026

    @aaronpowell
    Member

    @aaronpowell when making a PR, do I target main or aspire-13.1 like in #1021 ?

    Target main, as I will get around to doing a merge of the 13.1 branch and release that soon

  9. dealloc commented on Jan 20, 2026

    @dealloc
    ContributorAuthor

    @aaronpowell opened a PR, added some questions regarding potential conflicts and the OTLP integration

  10. github-actions commented on Mar 31, 2026

    @github-actions
    Contributor

    We have noticed this issue has not been updated within 21 days. If there is no action on this issue in the next 14 days, we will automatically close it. You can use /stale-extend to extend the window.

  11. github-actions commented on Apr 14, 2026

    @github-actions
    Contributor

    This issue has been stale for 5 weeks and has been automatically closed.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions