You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/24 01:06:38 UTC
[GitHub] [airflow] bhavaniravi opened a new issue, #24624: Redacted Variables override original value
bhavaniravi opened a new issue, #24624:
URL: https://github.com/apache/airflow/issues/24624
### Apache Airflow version
2.2.2
### What happened
1. Create a variable `sample_access_token` with value `random`
2. Export the variable, you will see the value
3. Click on edit and save
4. Export the variable, the variable value will be updated to `*******` the
### What you think should happen instead
The original variable value should be persisted even when redacted field is saved
### How to reproduce
_No response_
### Operating System
Debian GNU/Linux 10 (buster)
### Versions of Apache Airflow Providers
_No response_
### Deployment
Astronomer
### Deployment details
_No response_
### Anything else
We can also add a UI check for this, if the form is not edited, one shouldn't be able to submit it
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #24624: Redacted Variables override original value
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1165532160
Why don't we simply remove the "hidden" field from the export altogether. This would be consistent with the approach that hidden values should never be accessible from the UI. The user still will be able to use CLI to make export including the hidden values.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on issue #24624: Redacted Variables override original value
Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1170863930
The only way I can think of is to add a hidden input and toggle it with JavaScript. But if we’re going to do JavaScript, it’s probably easier to eliminate the hidden input and just disable/enable the submit button directly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] github-actions[bot] closed issue #24624: Redacted Variables override original value
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #24624: Redacted Variables override original value
URL: https://github.com/apache/airflow/issues/24624
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] bhavaniravi commented on issue #24624: Redacted Variables override original value
Posted by GitBox <gi...@apache.org>.
bhavaniravi commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1170837002
In the frontend is there a way to add a form control that will save only if the field value is changed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] bhavaniravi commented on issue #24624: Redacted Variables override original value
Posted by GitBox <gi...@apache.org>.
bhavaniravi commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1168469649
That'd make it hard for users to check what variables are available. There are cases where users don't have access to infra to run Airflow CLI commands.
I can only think of two ways to go about this
- Disabling edit submit button unless the form is edited
- Not saving/raising an error if the form is submitted with `**********`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on issue #24624: Redacted Variables override original value
Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1170722235
For the “not saving `********`” part, the difficult thing is that a variable’s value can literally be anything, including an empty string, and eight asterisks. So doing any checks in the backend to not save a specific value is somewhat breaking compatibility.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] alexsstock commented on issue #24624: Redacted Variables override original value
Posted by GitBox <gi...@apache.org>.
alexsstock commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1220837058
@bhavaniravi I found this issue trying to solve the same problem.
We have disabled "edit" for all the roles in the UI. This let's people set and edit using the CLI only, but everyone can still see what is available in the UI.
I'm not sure if that helps you, but it helped our case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #24624: Redacted Variables override original value
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1167187781
Ah. I thought it's only export. So should not we simply skip those values and allow to omit them when updating via API, unless they are overridden? Or - simpler- why not have a "sentinel" value that will be treated differently at save (say '**********') . This is very highly unlikely someone might want to set a "secret" value to "**********" and we can warn the user and even provide some escaping capability if someone REALLY wants to set it ("**********\") for example (and "*********\" and if someone wants to set "**********") and so-on..
I think we want to treat redacted value as "write-only" and never send to the frontend.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] github-actions[bot] commented on issue #24624: Redacted Variables override original value
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1685205107
This issue has been automatically marked as stale because it has been open for 365 days without any activity. There has been several Airflow releases since last activity on this issue. Kindly asking to recheck the report against latest Airflow version and let us know if the issue is reproducible. The issue will be closed in next 30 days if no further activity occurs from the issue author.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on issue #24624: Exported variables are incorrectly redacted
Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1165158785
I changed the title since (if I understand correctly) the variables are not actually overwritten, it’s only (incorrectly) redacted in the export output.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on issue #24624: Redacted Variables override original value
Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1167155933
The problem is not the export, but clicking the save button. When a value is redacted, the original value is not sent to the frontend at all, and when the frontend posts back to save, that value gets overwritten since the POST request does not contain the original value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #24624: Redacted Variables override original value
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1168785515
> That'd make it hard for users to check what variables are available. There are cases where users don't have access to infra to run Airflow CLI commands.
I am confused. What woudl make it hard ? The whole idea of redacting certain values is to make them inaccessible via UI. If you do not want it, just do not make it encrypted. It's a feature not inconvenience.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] github-actions[bot] commented on issue #24624: Redacted Variables override original value
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1728969169
This issue has been closed because it has not received response from the issue author.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] bhavaniravi commented on issue #24624: Redacted Variables override original value
Posted by GitBox <gi...@apache.org>.
bhavaniravi commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1170693756
I see the Airflow list UI page as a source of truth for DAG developers. It will bring up queries like
1. On creating a variable for eg., `s3_access_token`, _I have created a variable, but it vanished from the screen. When I try to create again, it's saying duplicate key_
2. In a team of 3 devs, one creates`s3_access_token`, two weeks another dev wants to use the same variable but can't find it in the UI. Have to shuffle through 1st dev's code to look for the key
There are cases where infra and dag developers are isolated and won't have access to CLI(Astronomer Nebula). In such cases, UI is the source of truth.
This is why I think all the variables in metadata DB should be displayed(listed) on the UI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on issue #24624: Redacted Variables override original value
Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #24624:
URL: https://github.com/apache/airflow/issues/24624#issuecomment-1165413332
Since a variable can contain any value (including a blank string), there’s no way I can think of we can restore the original value without sending the value to the frontend. So I guess the only reasonable way we can prevent this from happening is to add some JavaScript, so the variable form cannot be submitted unless the user re-enters something in the _val_ field.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org