You can modify the security parameters on the fly by accessing the 'cyBle_authInfo' structure. This structure contains the default security settings of the device. Here you can set the bonding requirements.
Encryption/Authentication requirement of a specific characteristic only define the permissions of the characteristics and have no relation with setting the bonding requirements.
Thank you for your response! This seems to get me half way there. I am able to change the overall settings, however, I am not able to read any characteristic which has encryption required.
I also get CYBLE_EVT_GAP_AUTH_FAILED: 5.
So it seems I need to disable the encryption requirement on the characteristic...