# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Horizon UI config for the quickstart, served from
# https://skywalking.apache.org/horizon.yaml and fetched by
# content/quickstart-docker.{sh,ps1} beside the compose manifest.
#
# The Horizon image reads its backend wiring and login users ONLY from this
# file (mounted at the image's HORIZON_CONFIG path) — there are no env vars
# for the OAP URLs. The service names below must match the ones in the
# compose manifest the scripts download.
#
# Kept here rather than pulled from a branch tip so the quickstart stays
# reproducible: this copy is reviewed alongside the image versions the
# scripts pin. The upstream reference config lives at
# https://github.com/apache/skywalking-horizon-ui (docs/setup).

server:
  # Bind all interfaces. The default example config ships host: 127.0.0.1,
  # which binds container-loopback only and 503s from the host side.
  host: 0.0.0.0
  port: 8081

oap:
  # Point at the `oap` service on the compose network, not 127.0.0.1.
  queryUrl: http://oap:12800
  adminUrl: http://oap:17128
  zipkinUrl: http://oap:9412/zipkin

# Quickstart login: skywalking / skywalking. Change before exposing this beyond
# localhost. rbac defaults to enabled with the admin role granting `*`.
#
# The hash is Argon2id with the node-argon2 defaults (m=65536, t=3, p=4),
# generated with the argon2 module inside the Horizon image itself. To rotate it:
#   docker run --rm --entrypoint node apache/skywalking-ui:horizon-<version> \
#     -e 'require("/app/node_modules/argon2").hash("<password>").then(console.log)'
auth:
  backend: local
  local:
    users:
      - username: skywalking
        passwordHash: "$argon2id$v=19$m=65536,t=3,p=4$ulwTy/981LUpNFfSAjmKAg$lpp0WRYPoiGDoWA3Lg2e+CvCffIHE0TDEUsQMnjcwsU"
        roles: [admin]
