Potential security issue with default karaf console access control lists?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Potential security issue with default karaf console access control lists?

tomq42
Any user that can log on to the karaf console appears to be able to run the "shell:cat" command (among others), and hence view any file that the operating system user that's running the karaf process can see. Whilst there is access control on a few of the shell scope commands, it seems that the default access control allows any user to run things with no explicit access control.

This *feels* like a security issue to me.

I'd like to be able to restrict access to the shell completely, but from experiment and looking at the code it appears that anyone who has some kind of "role" assigned to them (either directly, or as a member of a group) appears to be able to connect to the karaf console, and hence can potentially navigate the visible filesystem.  This doesn't feel very desirable.

It seems a shame that I can no longer restrict access to the console using the "sshRole" configuration property (still referenced in the documentation), but it seems that was removed when the role based access control was introduced.

Other than physically restricting access to the SSH port, are there other ways I can restrict access to the console? Or do I need to develop my own access control list for the shell scope, and accept that all users can potentially access the console?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Potential security issue with default karaf console access control lists?

jbonofre
I agree: as we did for vi/edit command, we should limit cat to admin role.

Can you create a Jira about that ?

Thanks !
Regards
JB

On 08/31/2017 01:01 PM, [hidden email] wrote:

> Any user that can log on to the karaf console appears to be able to run the "shell:cat" command (among others), and hence view any file that the operating system user that's running the karaf process can see. Whilst there is access control on a few of the shell scope commands, it seems that the default access control allows any user to run things with no explicit access control.
>
> This *feels* like a security issue to me.
>
> I'd like to be able to restrict access to the shell completely, but from experiment and looking at the code it appears that anyone who has some kind of "role" assigned to them (either directly, or as a member of a group) appears to be able to connect to the karaf console, and hence can potentially navigate the visible filesystem.  This doesn't feel very desirable.
>
> It seems a shame that I can no longer restrict access to the console using the "sshRole" configuration property (still referenced in the documentation), but it seems that was removed when the role based access control was introduced.
>
> Other than physically restricting access to the SSH port, are there other ways I can restrict access to the console? Or do I need to develop my own access control list for the shell scope, and accept that all users can potentially access the console?
>
> Thanks.
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Potential security issue with default karaf console access control lists?

tomq42
OK, JIRA created.

I realise it's worse. I can *write* to files with "tac", so I can rewrite the users.properties file if I want to and create new users with admin priviledges. Cool.



> On 31 August 2017 at 13:04 Jean-Baptiste Onofré <[hidden email]> wrote:
>
>
> I agree: as we did for vi/edit command, we should limit cat to admin role.
>
> Can you create a Jira about that ?
>
> Thanks !
> Regards
> JB
>
> On 08/31/2017 01:01 PM, [hidden email] wrote:
> > Any user that can log on to the karaf console appears to be able to run the "shell:cat" command (among others), and hence view any file that the operating system user that's running the karaf process can see. Whilst there is access control on a few of the shell scope commands, it seems that the default access control allows any user to run things with no explicit access control.
> >
> > This *feels* like a security issue to me.
> >
> > I'd like to be able to restrict access to the shell completely, but from experiment and looking at the code it appears that anyone who has some kind of "role" assigned to them (either directly, or as a member of a group) appears to be able to connect to the karaf console, and hence can potentially navigate the visible filesystem.  This doesn't feel very desirable.
> >
> > It seems a shame that I can no longer restrict access to the console using the "sshRole" configuration property (still referenced in the documentation), but it seems that was removed when the role based access control was introduced.
> >
> > Other than physically restricting access to the SSH port, are there other ways I can restrict access to the console? Or do I need to develop my own access control list for the shell scope, and accept that all users can potentially access the console?
> >
> > Thanks.
> >
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Potential security issue with default karaf console access control lists?

jbonofre
Yeah, thanks. I gonna fix that.

Regards
JB

On 08/31/2017 02:29 PM, [hidden email] wrote:

> OK, JIRA created.
>
> I realise it's worse. I can *write* to files with "tac", so I can rewrite the users.properties file if I want to and create new users with admin priviledges. Cool.
>
>
>
>> On 31 August 2017 at 13:04 Jean-Baptiste Onofré <[hidden email]> wrote:
>>
>>
>> I agree: as we did for vi/edit command, we should limit cat to admin role.
>>
>> Can you create a Jira about that ?
>>
>> Thanks !
>> Regards
>> JB
>>
>> On 08/31/2017 01:01 PM, [hidden email] wrote:
>>> Any user that can log on to the karaf console appears to be able to run the "shell:cat" command (among others), and hence view any file that the operating system user that's running the karaf process can see. Whilst there is access control on a few of the shell scope commands, it seems that the default access control allows any user to run things with no explicit access control.
>>>
>>> This *feels* like a security issue to me.
>>>
>>> I'd like to be able to restrict access to the shell completely, but from experiment and looking at the code it appears that anyone who has some kind of "role" assigned to them (either directly, or as a member of a group) appears to be able to connect to the karaf console, and hence can potentially navigate the visible filesystem.  This doesn't feel very desirable.
>>>
>>> It seems a shame that I can no longer restrict access to the console using the "sshRole" configuration property (still referenced in the documentation), but it seems that was removed when the role based access control was introduced.
>>>
>>> Other than physically restricting access to the SSH port, are there other ways I can restrict access to the console? Or do I need to develop my own access control list for the shell scope, and accept that all users can potentially access the console?
>>>
>>> Thanks.
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> [hidden email]
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com