PVA/SPVA: track SPVA version independently and move XDG keychain dir pva/<ver> -> spva/<n.n.n>

Aberta Para iniciantes
#3,865 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
65/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Pouca atividade
Stack de tecnologia
java
Domínio
security

Direção de pesquisa

Comece em core/pva/src/main/java/org/epics/pva/PVASettings.java e leia a constante de versão e o caminho de descoberta automática do keychain TLS. Altere a versão codificada diretamente para a versão do SPVA e use spva/<version> para a descoberta, mantendo o valor alinhado com a versão oficial do lado do PVXS. O trabalho estará concluído quando a descoberta do Java usar o novo diretório e, conforme recomendado na issue, puder recorrer ao caminho legado pva/<version>.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Summary

In the Secure PVAccess (SPVA) line of work, the SPVA release version is being decoupled from the PVXS library version. On the C++ side (PVXS / PVACMS) the SPVA version becomes a separately-tracked number, and the well-known TLS keychain directory changes from pva/<pvxs-version> to spva/<spva-version>.

Phoebus's core/pva/ is an independent Java PVA implementation and does not link the C++ PVXS code, so it cannot consume that version programmatically. It must hard-code the SPVA version (as it already hard-codes the PVA version today) and keep it in sync by hand.

Current behaviour

core/pva/src/main/java/org/epics/pva/PVASettings.java:

// Hard-coded, documented as "Matches PVXS versionString()"
private static final String PVA_VERSION = "1.5";

// Well-known TLS keychain auto-discovery location:
//   <xdg_config_home>/pva/<PVA_VERSION>/<filename>
final String path = config_home + File.separator + "pva"
                  + File.separator + PVA_VERSION
                  + File.separator + filename;

Used to auto-discover server.p12 and client.p12 under ~/.config/pva/1.5/ when EPICS_PVA(S)_TLS_KEYCHAIN is unset, mirroring the PVXS config.cpp fallback.

Requested changes

  1. Replace the PVXS-derived PVA_VERSION with a hard-coded SPVA version constant (e.g. SPVA_VERSION), documented as manually mirroring the authoritative PVXS-side SPVA version, with a comment pointing at that source so the two stay in lockstep per SPVA release.

  2. Change keychain auto-discovery from pva/<PVA_VERSION> to spva/<SPVA_VERSION>:

    • ~/.config/spva/<n.n.n>/server.p12
    • ~/.config/spva/<n.n.n>/client.p12

    (literal pva -> spva, and the version source changes from PVXS major.minor to the SPVA n.n.n.)

Scope / interop notes

  • Java side uses only the config home path here (keychain discovery); there is no data-home / cert-DB usage, unlike the C++ tooling.
  • The directory must match whatever PVXS / PVACMS adopt, or the Java client and C++ tools will look in different places for shared keychains. Recommend the same migration behaviour on all sides: fall back to the legacy pva/<ver> path when the new spva/<n.n.n> one is absent, so existing deployments keep working.

Context

This is the Phoebus-side counterpart of the SPVA version-tracking change being made in the PVXS and PVACMS repositories; those define the authoritative SPVA version and the spva/<n.n.n> convention. Phoebus tracks the same value by hand.

Linguagem predominante
Java
Estrelas
130
Forks
132
Merge médio
2d 12h
PRs com merge (30d)
22

Preparar o ambiente

  • Sem Dockerfile nem arquivo Docker Compose
  • Tem um modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de ControlSystemStudio/phoebus

Todas as issues de ControlSystemStudio/phoebus

Issues semelhantes

Mais issues de Java

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.