Skip to content

Format specifiers for IETF system hostname and password #435

Closed

Description

@troglobit

As discussed in #326, generation of parts of factory-config are a bit opaque to users. An improvement would be to introduce a more declarative syntax:

  • /system/hostname: Support %-specifiers. We should probably support at least:
    • %i: OS ID (from /etc/os-release). infix on vanilla builds,
    • %h: Default hostname (DEFAULT_HOSTNAME from /etc/os-release). infix on vanilla builds,
    • %m: NIC specific part of base MAC, e.g., c0:ff:ee translated to c0-ff-ee
  • /system/authentication/user/password: Augment model to allow the literal factory-default or similar. This would indicate that the device's factory password, whatever it may be, should be used.

There has been requests for supporting yescrypt (#447), and similar, so updating the password hash pattern in ietf-system for $y$ will open up for also carrying a string like factory-default as well.

This would make it easier to support static factory-configs. For well-known products the interfaces and default network configuration can be hard coded.

Outstanding issue(s):

  • NETCONF SSH host key
  • OpenSSH host key (not managed by Infix currently)

The former is generated every boot for factory-config and failure-config, which is a bit unnecessary. The "genkey" created is referenced by the "default-key" in "ietf-netconf-server:netconf-server", so it could possibly be generated to a file in /cfg/ssl/ instead at first boot, like the HTTPS certs, and sourced from there when "genkey" public or private key are missing, and wiped like everything else on factory reset.

Activity

  1. self-assigned this
    on May 24, 2024
  2. added this to the Infix v24.05 milestone on May 24, 2024
  3. moved this from Todo to In progress in Infix & C:oon Jun 16, 2024
  4. added
    enhancement
    on Jun 16, 2024
  5. added 12 commits that reference this issue on Jun 16, 2024
    4417241
    a5cc99d
    5e672eb
    315f4f0
    aae5466
    66a1e74
    6fdd70d
    e3a6d66
    0549c64
    128e3b0
    c17d3dd
    a374a85
  6. linked a pull request that will close this issueSimplify defaults #480on Jun 20, 2024
  7. added a commit that references this issue on Jun 25, 2024
    44b9384
  8. added a commit that references this issue on Jun 25, 2024
    1361d02
  9. added a commit that references this issue on Jun 25, 2024
    067c911
  10. moved this from In progress to Done in Infix & C:oon Jun 25, 2024
  11. added a commit that references this issue on Jun 26, 2024
    174bf7d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions