Skip to content

Commit

Permalink
hiba: Add initial recipe for hiba
Browse files Browse the repository at this point in the history
Discussion to install the HIBA Internal OpenSSH to fetch dependencies
can be found in
https://lists.openembedded.org/g/openembedded-core/topic/94475279#172977

HIBA is a system built on top of regular OpenSSH certificate-based
authentication that allows to manage flexible authorization of
principals on pools of target hosts without the need to push customized
authorized_users files periodically.

This recipe allow us to manage SSH to production machines easily and not
rely on authorized keys.

Tested:
Ran the local-setup.sh and works fine on a BMC.
```
$ ssh -F /tmp/tmp.w8itTW/ssh_config -p 2201 root@localhost
 #####################################################
 #                 setup-local.sh                    #
 # Host Identity Based Authorization SSHD example.   #
 #####################################################
prodHost: limited access
Connection to localhost closed.
$ ssh -F /tmp/tmp.w8itTW/ssh_config -p 2202 root@localhost
 #####################################################
 #                 setup-local.sh                    #
 # Host Identity Based Authorization SSHD example.   #
 #####################################################
Last login: Thu Jan  1 00:47:28 1970 from ::1
```

Signed-off-by: Willy Tu <wltu@google.com>
  • Loading branch information
wltu committed Jan 17, 2023
1 parent c4829fa commit 1bc9bb3
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions meta-oe/recipes-connectivity/hiba/hiba_git.bb
@@ -0,0 +1,50 @@
SUMMARY = "Google Host Identity Based Authorization"
DESCRIPTION = "HIBA is a system built on top of regular OpenSSH \
certificate-based authentication that allows to manage flexible \
authorization of principals on pools of target hosts without the need to \
push customized authorized_users files periodically."

S = "${WORKDIR}/git/hiba"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=7e161abe9a4585310725dd86c28d1ae2"

PV = "git${SRCPV}"

inherit autotools

DEPENDS = "openssl openssh zlib"
RDEPENDS:${PN} = " bash"

SRC_URI = " \
git://github.com/google/hiba;protocol=https;branch=main;destsuffix=git/hiba;name=hiba \
git://github.com/openssh/openssh-portable.git;protocol=https;branch=master;destsuffix=git/openssh-portable;name=openssh \
"
SRCREV_hiba = "cae606dafc5692240ac49441fd57653d7aade99b"

# Internal OpenSSH version for HIBA to link against (the version doesn't have
# to match the actual installed version).
# Discussion in
# https://lists.openembedded.org/g/openembedded-core/topic/94475279#172977
SRCREV_openssh = "15a01cf15f396f87c6d221c5a6af98331c818962"
SRCREV_FORMAT = "hiba"

EXTRA_OECONF = " \
--with-opensshdir=${WORKDIR}/git/openssh-portable \
--prefix=/usr/ \
"

do_configure_openssh() {
cd "${WORKDIR}/git/openssh-portable"
autoreconf
./configure ${CONFIGUREOPTS}
cd "${S}"
}

do_compile_openssh() {
cd "${WORKDIR}/git/openssh-portable"
oe_runmake
cd "${S}"
}

addtask compile_openssh before do_configure after do_configure_openssh
addtask configure_openssh before do_compile_openssh after do_unpack

0 comments on commit 1bc9bb3

Please sign in to comment.