Estou tentando configurar uma VPN Strongswan/IKEV2 no Ubuntu 23.04. Eu tenho o plugin Network Manager compilado e funcionando.
Quando tento a conexão, recebo o erro abaixo no syslog, informando que não é possível abrir o pacote de certificados.
Com base no log, parece que o Apparmor está bloqueando o acesso.
Como faço para corrigir isso para que o Apparmor permita acesso ao arquivo?
2023-10-12T22:07:00.546588-04:00 fafnir charon: 10[CFG] received stroke: add connection '3c204271-9b89-4f25-85b8-3e13d53e6bde'
2023-10-12T22:07:00.546660-04:00 fafnir charon: 10[CFG] added configuration '3c204271-9b89-4f25-85b8-3e13d53e6bde'
2023-10-12T22:07:01.492277-04:00 fafnir charon: 12[CFG] rereading secrets
2023-10-12T22:07:01.492891-04:00 fafnir charon: 12[CFG] loading secrets from '/etc/ipsec.secrets'
2023-10-12T22:07:01.492904-04:00 fafnir charon: 12[CFG] loading secrets from '/etc/ipsec.d/ipsec.nm-l2tp.secrets'
2023-10-12T22:07:01.492915-04:00 fafnir charon: 12[LIB] opening '/home/alan/pki2/client_fafnir.p12' failed: Permission denied
2023-10-12T22:07:01.492949-04:00 fafnir charon: 12[LIB] building CRED_CONTAINER - PKCS12 failed, tried 3 builders
2023-10-12T22:07:01.492960-04:00 fafnir charon: 12[CFG] loading credentials from '/home/alan/pki2/client_fafnir.p12' failed
2023-10-12T22:07:01.495808-04:00 fafnir charon: 13[CFG] received stroke: initiate '3c204271-9b89-4f25-85b8-3e13d53e6bde'
2023-10-12T22:07:01.496243-04:00 fafnir kernel: [217471.389372] audit: type=1400 audit(1697162821.489:404): apparmor="DENIED" operation="open" class="file" profile="/usr/lib/ipsec/charon" name="/home/alan/pki2/client_fafnir.p12" pid=913258 comm="charon" requested_mask="r" denied_mask="r" fsuid=0 ouid=1000
Copiou o pacote de certificados para /etc/ipsec.d/certs e resolveu o problema de permissão.