! SafeAI read-only account: Cisco IOS / IOS-XE        (from the vendor's documentation; to be checked line by line on the SafeCadence lab)
! Replace <PASSWORD> and <SAFEAI>, the SafeAI server's address. Paste in configuration mode (configure terminal).
!
! 1. The account: privilege 7 can read the whole configuration but cannot enter configuration mode.
username safeai-ro privilege 7 secret 0 <PASSWORD>
file privilege 7
privilege exec level 7 more
!
! 2. SSH version 2 (skip if already on).
ip ssh version 2
!
! 3. Send the device log to SafeAI, so every change is seen within seconds and who made it is known.
logging host <SAFEAI> transport udp port 514
logging trap notifications
login on-success log
login on-failure log
archive
 log config
  logging enable
  notify syslog contenttype plaintext
  hidekeys
!
! 4. SNMPv3, read-only (recommended: discovery then identifies devices without logging in). Checked on the SafeCadence lab
!    (Cisco IOSv 15.9: SHA-1 and AES-128; newer IOS-XE also offers "auth sha-256"). The user and its keys never appear in
!    the running configuration. Put <AUTH-KEY> and <PRIV-KEY> (8+ characters each) in SafeAI's setup file as SNMP_AUTH_KEY / SNMP_PRIV_KEY.
snmp-server view SAFEAI-RO iso included
snmp-server group SAFEAI-RO v3 priv read SAFEAI-RO
snmp-server user safeai SAFEAI-RO v3 auth sha <AUTH-KEY> priv aes 128 <PRIV-KEY>
!
! 5. If your vty lines use an access-class, add a permit for <SAFEAI> to that access list.
end
write memory
!
! With TACACS+ or RADIUS instead of a local account: give the account privilege 15 and authorize only
! "show ...", "more system:running-config" and "terminal length 0".
