{% extends "base.html" %} {#- Project → Stands & access. Expects: project, environments, proposals, policies (by environment id), project_policy, optional error + error_target (the form it belongs to), confirm (action, message, fields). Plain form posts: every write comes from this page in a browser (cookie + CSRF). -#} {%- macro hidden_csrf() -%}{%- endmacro %} {%- macro error_for(target) -%}{% if target and error and error_target == target %}{% endif %}{%- endmacro %} {%- macro origin_label(origin) -%}{{ "default" if origin == "preset:default" else "policy: " ~ origin }}{%- endmacro %} {%- macro level_options(selected, default_level) -%} {%- for lvl in ["none", "read", "ask", "full"] %} {%- endfor %} {%- endmacro %} {%- macro environment_form(e, action, target) -%} {%- set kind = e.kind if e else "test" %}
{{ hidden_csrf() }} {{ error_for(target) }}
Per capability
{% for cap in ["sign_in", "ssh", "kubectl", "db", "deploy"] %} {% endfor %}
{%- endmacro %} {%- macro access_form(action, target, entry=None, tests_allowed=False) -%}
{{ hidden_csrf() }} {{ error_for(target) }} {% if tests_allowed or (entry and entry.test_secrets) %} {% endif %}

ssh: alias, host, port, user, key_path_ref · kubectl: context, namespace · db: type, host, port, port_forward, database, user, password_ref · gitops: repo, path, branch · logs, monitoring: url. References only: a key file path, an environment variable name ($DB_PASSWORD) or a vault path, never the secret.

{%- endmacro %} {% block title %}Stands & access · {{ project.name }} · relaybay{% endblock %} {% block crumbs %}/{{ project.name }}/Stands & access{% endblock %} {% block content %}

Stands & access · {{ project.name }}

Actions on live

Where this project runs, how agents reach it and what they may do there unasked. relaybay stores references only, never passwords, keys or tokens. The guard ({{ project_policy.guard_mode }}, preset {{ project_policy.preset }}) is a safety net against mistakes, not a sandbox: it only recognises the names listed here.

{% if error and not error_target %}{% endif %} {% if confirm %}

Confirm

{{ confirm.message }}

{{ hidden_csrf() }} {% for name, value in confirm.fields %}{% endfor %}
Cancel
{% endif %} {% include "_proposals.html" %} {% for e in environments %} {%- set pol = policies[e.id] %} {%- set level = pol.level_for(e) %} {%- set origin = pol.level_origin(e) %} {%- set tests_allowed = pol.test_secrets_allowed(e.kind) %}

{{ e.name }}

{{ e.kind }} agents: {{ level }}{% if origin != "environment" %} ({{ origin_label(origin) }}){% endif %} {% set href = e.base_url|http_url %}{% if href %}{{ e.base_url }}{% endif %}
{{ error_for("env-" ~ e.id) }}
{% if e.overrides %}
Per capability
{% for cap, lvl in e.overrides.items() %}{{ cap }}: {{ lvl }} {% endfor %}
{% endif %}
Sign in
{{ "agent may sign in and remember the login" if e.sign_in_allowed else "no" }}{% if e.login_state_path %} · {{ e.login_state_path }}{% endif %}
{% if e.notes %}
Notes
{{ e.notes }}
{% endif %}
Changed
by {{ e.updated_by }}

Access

{% if e.access %} {% else %}

No access entries yet.

{% endif %}
Add access {{ access_form("/p/" ~ project.slug ~ "/environments/" ~ e.id ~ "/access", "access-new-" ~ e.id, None, tests_allowed) }}
Edit environment and level {{ environment_form(e, "/p/" ~ project.slug ~ "/environments/" ~ e.id, "") }}
{{ hidden_csrf() }}
{% else %}

No environments yet. Add local, test and live below; agents read them with environments_get.

{% endfor %}

Add an environment

Levels from the policy: local {{ project_policy.level("local") }}, test {{ project_policy.level("test") }}, live {{ project_policy.level("live") }} (Settings → Policy). Raising live above read asks for a confirmation.

{{ environment_form(None, "/p/" ~ project.slug ~ "/environments", "new") }}
{% endblock %}