How to map permissions to role?

Hi,

I have created following things under a client that i created on the keycloak:

Roles: Role1, Role2
Permissions: permission1, permission2

How can I make these permissions to roles? I dont see there anyway to do that.

when I enabled the permission checkbox then it display permissions from some other clients. I am not sure why permissions of some other client is displayed here.

Can anyone help here? i went through some documentation but couldn’t find anything that clarify this.