@midee
@janis-ax is correct that this is not possible.
"ONLY" sensitive attributes can be encrypted/masked. Only component properties coded to as a sensitive property field would be able to decrypt an encrypted/masked value.
If setting policies to block specific users from being able to view the data on these components, you may want to look at other options for performing these endpoint authentication/authorization actions. For example, with the NiFi endpoints you could use mutual TLS via certificates instead of token based authentication for accessing the endpoints. This does not mean you need to stop using or un-configure the token based authentication methods for access to your secured NiFi.
If the endpoint you are trying to reach is not NiFi, you may want to see what other options it may offer for authentication that are not token based.
Hope this helped,
Matt