[36345] in Kerberos

home help back first fref pref prev next nref lref last post

New remctl ACL scheme and execution of external ACL checking program

daemon@ATHENA.MIT.EDU (=?windows-1252?Q?R=E9mi_Ferrand?=)
Tue Aug 5 11:55:58 2014

Message-ID: <53E0FE7B.4020201@cc.in2p3.fr>
Date: Tue, 05 Aug 2014 17:55:39 +0200
From: =?windows-1252?Q?R=E9mi_Ferrand?= <remi.ferrand@cc.in2p3.fr>
MIME-Version: 1.0
To: Russ Allbery <eagle@eyrie.org>
In-Reply-To: <53C7C022.3050508@cc.in2p3.fr>
Cc: "kerberos@mit.edu" <kerberos@mit.edu>
Content-Type: multipart/mixed; boundary="===============0222924091=="
Errors-To: kerberos-bounces@mit.edu

This is a cryptographically signed message in MIME format.

--===============0222924091==
Content-Type: multipart/signed; protocol="application/pkcs7-signature";
	micalg=sha1; boundary="------------ms090605030909090009010106"

This is a cryptographically signed message in MIME format.

--------------ms090605030909090009010106
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: quoted-printable

Sorry for the spam, afterwards I realized that this was more appropriate =

to open a new thread for this very subject.

Regards

R=E9mi


On 17/07/2014 14:22, R=E9mi Ferrand wrote:
>
> * REMCTL-8: Add support for external ACL checking programs. If the
> program exits with a zero status, access is granted. If it exits 1,
> access is not granted but checking continues. If it exits with any
> other exit status, access is not granted and checking aborts. Ideally,
> for writing generic ACL checking programs, the program should get the
> type and service of the remctl command as well as any arguments.
> However, it would also be good to support passing other arguments into
> the program as specified in the ACL file.
>

I've started to think about this feature and I think that this could be=20
a great enhancement to be able to access to requested command,=20
subcommand and args in the "acl_check_" functions (I guess that by "type =

and service of the remctl command as well as any arguments" you meant=20
"command, subcommand and args", didn't you ?)


I've created https://github.com/rra/remctl/pull/2 as a proposal but this =

could be a little "na=EFve" since it was very straightforward.
This should be more considered as a "discussion starter" about how to=20
grant access to command, subcommand and args to "acl_check_" functions.


Talking about the support for external ACL checking programs,
for now my idea is to have a configuration line like:


testcmd ALL /usr/bin/myprogram.pl exec_extra_arg=3D"--arg1 --arg2=20
--arg-with-value=3D'foo'" exec:/path/to/acl_checking_command.pl


with the new "exec" (or something like this) ACL scheme that would=20
execute the external program "/path/to/acl_checking_command.pl" and=20
check for its return code to allow/deny access or continue ACL processing=
=2E


My idea was that the program "/path/to/acl_checking_command.pl" would=20
always receive those arguments:

--user=3D"remote user authenticated throw gssapi"
--command=3D"requested command"
--subcommand=3D"requested subcommand" (if subcommand is not NULL)

(people that, in the future, would write external validation scripts=20
MUST support those options)


and if option "exec_extra_arg" is used in configurationn file, then=20
those extra arguments should be appended to previous mandatory ones,=20
which could lead to the final execution of


/path/to/acl_checking_command.pl \
    --user=3D"the_user" \
    --command=3D"the_command" \
    --subcommand=3D"subcommand_if_any" \
    --arg1 \
    --arg2 \
    --arg-with-value=3D'foo'


Everything above is just a proposal and opened to discussion, actually=20
I'll be glad to have other ideas / opinions.

Cheers

R=E9mi



--------------ms090605030909090009010106
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIIczCC
A7YwggKeoAMCAQICAQMwDQYJKoZIhvcNAQEFBQAwLDELMAkGA1UEBhMCRlIxDTALBgNVBAoT
BENOUlMxDjAMBgNVBAMTBUNOUlMyMB4XDTA5MDEyMTA5MDM1MloXDTI5MDEyMDA5MDM1Mlow
NTELMAkGA1UEBhMCRlIxDTALBgNVBAoTBENOUlMxFzAVBgNVBAMTDkNOUlMyLVN0YW5kYXJk
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnKlkarQHIxnDvggIxOIqXe3UKN7+
P6DtkkRrFkc1EzeNdKn1TYPkBRuPCGFM3ndb16n/u2Wdyaw8D/GJe5MioEcPXwa+jnigC3nX
QmVhcmOSQIpbZxD61ic+2HdNHnnbb0sSAF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K6Qxw4s9lDCBApqJT
cF8dSMSrAmA6fG+otFddxuaqzsX3RSyjtpbtx5Zc8Qu27J+/fjqiyKVf1AzqROPUhISLXcF2
TONG8VX+j7txRYvGifgfAP4wL7o0g5fd1mPAfO+H2PhNkVf0pM+nhpkaid46vuUdRnhJNTm9
lBszGCqUrP4Ncwt1czijy3HPXJ/1g+rX+6Ois3CQHL/feJ7Slv1DjlFji37nlyz/BuPgwD/Q
PVUmBoLA/HyAOzpx65Z4mOvHxuNAnCB39aIBiAmx6oKaWulWES3F0LUwBR629Z0dDuu5exX1
OhWFVp26yWry5sWSAM0m7HiCAAAAAAAA
--------------ms090605030909090009010106--

--===============0222924091==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

--===============0222924091==--

home help back first fref pref prev next nref lref last post