@QuantumCache Trying to connect DPS using SAS tokens and Symmetric key where client as "Azure SDK for C" code..
Used Python script to generate the SAS tokens (def generate_sas_token(uri, key, policy_name, expiry=3600):
uri -> (test-dps.azure-devices-provisioning.net)
key -> Symmetric Key ->primary key
policy_name -> None
With above configurations & python script im able to generate below SAS token
SharedAccessSignature sr=test-dps.azure-devices-provisioning.net&sig=daP5K1GGeVFFghkkT2X4SX8iBLaO07rmtsPgMuzSmrc%3D&se=1616557869
Username is generated using SDK APi az_iot_provisioning_client_get_user_name()
Above SAS token is used as password during Azure MQTT connection
Observation: Connection refused from the Azure server for MQTT connect request
Query:
- Everytime "se" value in the SAS token will change, do we need to link the same in the Azure DPS portal?
- Do symmetric key has to be linked in the application as referenced in prov_dev_set_symmetric_key_info()