Release Number | 0.6.0 |
---|---|
Release Date | July 23th, 2023 |
Release Codename | Tech Preview #4 |
Tag | 0.6.0 |
Release 0.6.0
Main changes
New Logo and refresh of the frontend
Infrahub has a new logo and a new paint of colors based on a shade of blue Infrahub's logo is inspired by a tree.
Why a tree ? because trees are composed of branches like Infrahub and the leaves on a tree have some similarities to the nodes on a graph.
User Management and Authentication
Infrahub now supports standard user management and authentication systems.
A user account can have 3 levels of permissions
admin
read-write
read-only
By default, Infrahub will allow anonymous access in read-only. it's possible to disable this feature via the configuration main.allow_anonymous_access
or via the environment variable INFRAHUB_ALLOW_ANONYMOUS_ACCESS
Authentication mechanisms
Infrahub supports two authentication methods
- JWT token: Short live token that are generated on demand from the API
- API Token: Long live token generated ahead of time.
API token can be generated via the user profile page or via the Graphql interface.
JWT | TOKEN | |
---|---|---|
API / GraphQL | Yes | Yes |
Frontend | Yes | No |
Python SDK | Soon | Yes |
infrahubctl | Soon | Yes |
GraphQL Playground | No | Yes |
While using the API the Authentication Token must be provided in a header named X-INFRAHUB-KEY
Groups
With the new Group model, it's now possible to create arbitrary groups of objects. A group can is composed of members and subscribers and both can be objects of any types.
By default a CoreStandardGroup is available but it's possible to create new type of groups with additional attributes or relationships.
It's possible to retrieve the list of groups a given object is member of
or subscriber of
with the relationships
member_of_groups
and subscriber_of_groups
.
These 2 relationships will be automatically added to all objects in GraphQL.
We are just scratching the surface with the groups. Over time, Groups will have a major role in infrahub and they will act as glue between a lot of other features so stay tuned for more update in the next release.
Namespace for the Schema
All models for nodes
and generics
defined in the schema must now have a Namespace. The introduction of Namespace will allow us to provide a better classification of the models as the schema grows. It will also allow us to better differenciate between internal and user provided models which will ultimately lead to a better user experience.
In the process we also remove the former attribute name
attribute on the model because it was highly redundant with the kind
.
In the new format, a model is define by its namespace
and its name
, which together forms for the new kind
The kind doesn't have to be provided by the user anymore and its generated by concatenating the namespace
and the name
Kind = Namespace + Name
In the example below, the kind of this model will be InfraRack
nodes:
- name: Rack
namespace: Infra
label: Rack
Migrate your existing schema
To migrate an existing schema, you need to:
- define the
namespace
- delete the current
name
since it's not used anymore - rename the current
kind
intoname
- (optional) add a label, otherwise the label will be generated from the new kind
Impact on the GraphQL API
Previously the name was mainly used to generate the top level graphql query. As a result of this change, the format of the GraphQL top level query are now using the Kind in CamelCase.
Before | After |
|
|
Add Diff view for files in Git Repository
It's now possible to visualise the diff for the files that are part of a Git repository in the Branch View along with the diff for the data.
Support for Memgraph as the main database
In addition to Neo4j, it's now possible to run Infrahub on Memgraph.
The main benefits to use memgraph is its speed, especially on non-production environment.
The demo environment and the tests are now using Memgraph by default.
It's possible to start the demo environment with the flag --database=neo4j
to switch to Neo4j.
Query all Generics Model directly from GraphQL
All generics models are now exposed at the top level of the GraphQL query by default. This will make it much easier to query for generic nodes whithout having to go through the relationships of a given object.
Other Changes
All generics objects in GraphQL
- Python SDK : Update query methods to allow user to select fields to query and not query all relationships by default @dgarros (#748)
- Update infrahubctl to work with authentication + various fixes @dgarros (#742)
- Change IPHost and IPNetwork graphql type to string @wvandeun (#713)
- Initial prototype of a synchronization engine