Skip to content

Commit 1358931

Browse files
committed
hiba: Add initial recipe for hiba
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>
1 parent c4829fa commit 1358931

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
SUMMARY = "Google Host Identity Based Authorization"
2+
DESCRIPTION = "HIBA is a system built on top of regular OpenSSH \
3+
certificate-based authentication that allows to manage flexible \
4+
authorization of principals on pools of target hosts without the need to \
5+
push customized authorized_users files periodically."
6+
7+
S = "${WORKDIR}/git"
8+
9+
LICENSE = "BSD-3-Clause"
10+
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=7e161abe9a4585310725dd86c28d1ae2"
11+
12+
SRC_URI = "git://github.com/google/hiba;protocol=https;branch=main"
13+
SRCREV = "98b551e2a0297b1872851bb81b6d3a2b682778ee"
14+
15+
# HIBA Internal OpenSSH Version (Should match the version in meta-oe).
16+
# Discussion in
17+
# https://lists.openembedded.org/g/openembedded-core/topic/94475279#172977
18+
OPENSSH_SRC_URI="git@github.com:openssh/openssh-portable.git"
19+
OPENSSH_SRCREV="15a01cf15f396f87c6d221c5a6af98331c818962"
20+
21+
PV = "1.0+git${SRCPV}"
22+
23+
inherit autotools
24+
25+
DEPENDS = "openssl openssh zlib"
26+
27+
EXTRA_OECONF = " \
28+
--with-opensshdir=${WORKDIR}/openssh-portable \
29+
--prefix=/usr/ \
30+
"
31+
32+
# Make sure that MACHINE_FEATURES includes hiba before continuing
33+
do_configure:prepend(){
34+
if ${@bb.utils.contains("DISTRO_FEATURES", "hiba", "false", "true", d)} ; then
35+
echo "Skip building ${PN} because hiba support is disabled, It can be enabled it via DISTRO_FEATURES"
36+
exit 1
37+
fi
38+
39+
pushd "${WORKDIR}"
40+
git clone "${OPENSSH_SRC_URI}"
41+
cd openssh-portable
42+
git checkout "${OPENSSH_SRCREV}"
43+
autoreconf
44+
./configure ${CONFIGUREOPTS}
45+
oe_runmake
46+
popd
47+
}
48+
49+
do_install:append() {
50+
rm ${D}${sbindir}/hiba-ca.sh
51+
rm -rf ${WORKDIR}/openssh-portable
52+
}

0 commit comments

Comments
 (0)