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

Supports a GraphQL query to retrieve the status of a Forwarder session for a device #446

Closed
davidebriani opened this issue Feb 13, 2024 · 0 comments

Comments

@davidebriani
Copy link
Collaborator

davidebriani commented Feb 13, 2024

As a complement to issue #445, API clients may need to retrieve the status of a Forwarder session they requested before attempting to access it.

The Edgehog backend can support a forwarderSession GraphQL query.
A client would use the query to inspect the status of a device → Forwarder session, and know whether the session is ready to be accessed or if it doesn't exist yet.

query {
  forwarderSession(deviceId: ID!, sessionToken: String!) {
    token: String
    status: "CONNECTED" | "CONNECTING"
    secure: Boolean
    forwarderHostname: String
    forwarderPort: Integer
  }
}

To support the query, the backend queries the Astarte interface ForwarderSessionsState for the specified device and returns the details about the session identified by the sessionToken.

When the device is not managing the session yet (or anymore), the session effectively doesn't exist and the query returns an error.

davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 21, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 21, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 21, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 22, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 22, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 22, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 22, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 22, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 22, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 23, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 27, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Feb 28, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Mar 5, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Mar 5, 2024
Define a `forwarderSession` GraphQL query that can be used by clients to
inspect the status of a device → Forwarder session, and know whether the
session is ready to be accessed and it is closed.

Closes edgehog-device-manager#446

Signed-off-by: Davide Briani <davide.briani@secomind.com>
davidebriani added a commit to davidebriani/edgehog that referenced this issue Mar 18, 2024
Note down a summary of the implemented functionality in the changelog
file.

Close edgehog-device-manager#444, edgehog-device-manager#445, edgehog-device-manager#446, edgehog-device-manager#447.

Signed-off-by: Davide Briani <davide.briani@secomind.com>
@rbino rbino closed this as completed in ef650bc Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant