GitHub user noderat edited a comment on the discussion: microsoft-psrp securestring jinja2.exceptions.TemplateAssertionError
No, that is correct and follows my assumptions. According to the documentation operator includes a jinja template filter that should be applied at the worker during pre-processing of the task to tag an argument or parameter dictionary value going to the operator so the operator can pass the argument/paramter to the remote machine as a SecureString, thus allowing secure parameters/arguments to be passed. @potiuk if somehow I'm misunderstanding things, how can the minimal example I provided that throws an error be modified to demonstrate how to pass in a parameter/argument in the operator and tag it as a SecureString [as indicated in the operator's documentation](https://airflow.apache.org/docs/apache-airflow-providers-microsoft-psrp/stable/operators/index.html#secure-strings)? Again, here's the minimal failing example: ```python import datetime from airflow import DAG from airflow.providers.microsoft.psrp.operators.psrp import PsrpOperator with DAG( dag_id="psrpoperator_securestring_error_reproduction", start_date=None, schedule_interval=None, render_template_as_native_obj=True, ): PsrpOperator( task_id = "psrp_task", psrp_conn_id = "SomeConnection", cmdlet = "Write-Output", arguments = [ "{{ 'foo' | securestring }}" ] # Attempt to pass 'foo' to remote machine as a SecureString. Fails with error: jinja2.exceptions.TemplateAssertionError: No filter named 'securestring' ) ``` GitHub link: https://github.com/apache/airflow/discussions/44095#discussioncomment-11294724 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
