-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JIRA SONIC-10898] RADIUS Management User Authentication Feature (1)
* First Cut for RADIUS Management User Authentication Feature. * PAP/CHAP Authentication. * NSS Module. * Click Cli Change-Id: Ie079bb7a19f8626ed0470abf3379084b6f3342e2
- Loading branch information
Showing
37 changed files
with
1,965 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# server[:port] shared_secret timeout(s) source_ip vrf | ||
{{ server.ip }}:{{ server.auth_port }} {{ server.passkey }} {{ server.timeout }} {% if server.src_ip %} {{ server.src_ip }} {% endif %} {% if server.vrf %} {% if not server.src_ip %} - {% endif %} {{ server.vrf }}{% endif %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# RADIUS NSS Configuration File | ||
# | ||
# Debug: on|off|trace | ||
# Default: off | ||
# | ||
# debug=on | ||
{% if debug %} | ||
debug=on | ||
{% endif %} | ||
|
||
# | ||
# User Privilege: | ||
# Default: | ||
# user_priv=15;pw_info=remote_user_su;uid=1000;gid=1000;group=sudo,docker;dir=/home/admin;shell=/bin/bash | ||
# user_priv=1;pw_info=remote_user;uid=65534;gid=65534;group=users;dir=/var/tmp;shell=/bin/bash | ||
|
||
# Eg: | ||
# First need to create netops, operator using: | ||
# useradd netops -G users -u 2007 -g 100 -c "netops" -m -s /bin/bash | ||
# useradd operator -G users -u 2001 -g 100 -c "operator" -m -s /bin/rbash | ||
# | ||
# Then uncomment the lines below. | ||
# | ||
# user_priv=15;pw_info=remote_user_su;uid=1000;gid=1000;group=sudo,docker;dir=/home/admin;shell=/bin/bash | ||
# user_priv=7;pw_info=netops;uid=2007;gid=100;group=users;dir=/home/netops;shell=/bin/bash | ||
# user_priv=1;pw_info=operator;uid=2001;gid=100;group=users;dir=/home/operator;shell=/bin/rbash | ||
|
||
# many_to_one: | ||
# y: Map TACACS+ users to one local user per privilege. | ||
# n: Create local user account on first successful authentication. | ||
# a: Anonymous: Return least privileged(user_priv=1) user info for unknown. | ||
# Default: n | ||
# | ||
|
||
# Eg: | ||
# many_to_one=y | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# libpam-radius-auth packages | ||
|
||
PAM_RADIUS_VERSION = 1.4.1-1 | ||
|
||
export PAM_RADIUS_VERSION | ||
|
||
LIBPAM_RADIUS = libpam-radius-auth_$(PAM_RADIUS_VERSION)_amd64.deb | ||
$(LIBPAM_RADIUS)_SRC_PATH = $(SRC_PATH)/radius/pam | ||
SONIC_MAKE_DEBS += $(LIBPAM_RADIUS) | ||
|
||
SONIC_STRETCH_DEBS += $(LIBPAM_RADIUS) | ||
|
||
# libnss-radius packages | ||
|
||
NSS_RADIUS_VERSION = 1.0.1-1 | ||
|
||
export NSS_RADIUS_VERSION | ||
|
||
LIBNSS_RADIUS = libnss-radius_$(NSS_RADIUS_VERSION)_amd64.deb | ||
$(LIBNSS_RADIUS)_SRC_PATH = $(SRC_PATH)/radius/nss | ||
SONIC_MAKE_DEBS += $(LIBNSS_RADIUS) | ||
|
||
SONIC_STRETCH_DEBS += $(LIBNSS_RADIUS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.ONESHELL: | ||
SHELL = /bin/bash | ||
.SHELLFLAGS += -e | ||
|
||
MAIN_TARGET = libnss-radius_$(NSS_RADIUS_VERSION)_amd64.deb | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
pushd ./libnss-radius | ||
|
||
make clean | ||
-rm -rf debian | ||
-rm -rf patches | ||
cp -r ../debian . | ||
cp -r ../patches . | ||
|
||
# Apply patch (if any) | ||
|
||
dpkg-buildpackage -rfakeroot -b -us -uc | ||
popd | ||
|
||
mv $(DERIVED_TARGETS) $* $(DEST)/ | ||
|
||
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
libnss-radius for Debian | ||
|
||
Please edit this to provide information specific to | ||
this libnss-radius Debian package. | ||
|
||
(Automatically generated by debmake Version 4.2.2) | ||
|
||
-- Arun Barboza <[email protected]> Tue, 24 Sep 2019 00:20:55 +0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
libnss-radius (1.0.1-1) unstable; urgency=low | ||
|
||
* Initial release. NSS lookups for RADIUS users with cached Management | ||
Privilege Level (MPL) attribute. | ||
|
||
-- Arun Barboza <[email protected]> Tue, 24 Sep 2019 00:20:55 +0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Source: libnss-radius | ||
Section: libs | ||
Priority: optional | ||
Maintainer: Arun Barboza <[email protected]> | ||
Build-Depends: debhelper (>=9) | ||
Standards-Version: 3.9.6 | ||
Homepage: http://www.broadcom.com | ||
|
||
Package: libnss-radius | ||
Section: libs | ||
Architecture: any | ||
Multi-Arch: same | ||
Pre-Depends: ${misc:Pre-Depends} | ||
Depends: ${misc:Depends}, ${shlibs:Depends} | ||
Description: NSS module for RADIUS authentication absent local account. | ||
NSS lookups for RADIUS authenticated users using the Management Privilege | ||
Level (MPL) cached attribute. |
Oops, something went wrong.