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

website/docs: update geoip and asn example to use the proper syntax #10249

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions website/docs/policies/expression.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ import Objects from "../expressions/_objects.md";
- `geoip`: GeoIP object, see [GeoIP](https://geoip2.readthedocs.io/en/latest/#geoip2.models.City)

```python
return context["geoip"].country.iso_code == "US"
return context["geoip"]["country"]["iso_code"] == "US"
```

- `asn`: ASN object, see [GeoIP](https://geoip2.readthedocs.io/en/latest/#geoip2.models.ASN)

```python
return context["asn"].autonomous_system_number == 64496
return context["asn"]["autonomous_system_number"] == 64496
```

- `ak_is_sso_flow`: Boolean which is true if request was initiated by authenticating through an external provider.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/releases/2024/v2024.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ The provided Compose file was updated with PostgreSQL 16. You can follow the pro

With this release, authentik now enforces unique group names. Existing groups with name collisions that were created in earlier versions can still exist, but any new groups you create will need a unique name. If changing attributes, permission-level, or parent on an existing group with a name collision, you need to also change its name to be unique. Note that changing members or roles associated with the group does not require a rename.

### GeoIP and ASN context object

The `context["geoip"]` and `context["asn"]` objects available in expression policies are now dictionaries. Attributes must now be accessed via dictionary accessors. See [our policy examples](../../policies/expression.mdx) for the updated syntax.

For instance, `context["geoip"].country.iso_code` must now become `context["geoip"]["country"]["iso_code"]`.

## New features

- **Google Workspace Provider** <span class="badge badge--primary">Enterprise</span> <span class="badge badge--info">Preview</span>
Expand Down
Loading