Re: [DISCUSS] Topic name restriction

2023-02-14 Thread Yong Zhang
> > Additional: > Since the disallowed topic names configuration needs more discussion about > name pattern, type etc. I think we can wait for the demand to consider it. > Sounds good. We can discuss this in the future with a new proposal if there has someone who needs it. Yong On Sat, 11 Feb

Re: [DISCUSS] Topic name restriction

2023-02-10 Thread mattisonchao
Hi guys. Thanks for your discussion in this thread. Since we have reached the discussion deadline. > I will keep this discussion for a week. If there are no more new types of > restrictions, I will refine the previous PIP-242[0] to explain more details. I would like to refine the PIP-242,

Re: [DISCUSS] Topic name restriction

2023-02-06 Thread mattisonchao
Hi, Asaf > I don't understand the idea suggested of making the validation > rulesconfigurable.If understand correctly:* "-partition" is not something you > want configurable - it should always bevalidated* System topics - once we > agree on a naming convention going forward, itshould always be

Re: [DISCUSS] Topic name restriction

2023-02-05 Thread Asaf Mesika
Thanks Mattison. I don't understand the idea suggested of making the validation rules configurable. If understand correctly: * "-partition" is not something you want configurable - it should always be validated * System topics - once we agree on a naming convention going forward, it should always

Re: [DISCUSS] Topic name restriction

2023-02-03 Thread mattisonchao
Hi, Asaf We are using the regular expression to check the name. "^[-=:.\\w]*$" The \w means [A-Za-z0-9_] , which includes underscores. Best, Mattison On Feb 2, 2023, 23:01 +0800, Asaf Mesika , wrote: > NamedEntity is not allowing underscores - does it make sense? > > > > On Thu, Feb 2, 2023 at

Re: [DISCUSS] Topic name restriction

2023-02-03 Thread mattisonchao
Hi, Yunze > The topic name character validation is already done by`NamedEntity#checkName` As Michael mentioned, the `NamedEntity#checkName` just checked the tenant and namespace. > But I have a concern that whether we shouldtreat all topics that start with > the long underscore ("__") as

Re: [DISCUSS] Topic name restriction

2023-02-03 Thread mattisonchao
Hi, Yong > How about using a blacklist way to restrict it? It's a great idea. Maybe we can define the rules like  `keyword` with regular expressions. Best, Mattison On Feb 2, 2023, 10:52 +0800, Yong Zhang , wrote: > Mattison, > > I agree with you about restricting the topic name. > > How

Re: [DISCUSS] Topic name restriction

2023-02-02 Thread Asaf Mesika
NamedEntity is not allowing underscores - does it make sense? On Thu, Feb 2, 2023 at 8:35 AM Michael Marshall wrote: > Thanks for starting this thread, Mattison. > > > The topic name character validation is already done by > > `NamedEntity#checkName`. > > Based on my reading of the code, only

Re: [DISCUSS] Topic name restriction

2023-02-01 Thread Michael Marshall
Thanks for starting this thread, Mattison. > The topic name character validation is already done by > `NamedEntity#checkName`. Based on my reading of the code, only the tenant and the namespace names are validated using that method. There is a call [0] that looks like it validates topic names,

Re: [DISCUSS] Topic name restriction

2023-02-01 Thread r...@apache.org
Hi Mattison: Agree with Yong's idea. We can expose `disallowed topic` as a configuration to the user side, and a more flexible way is to expose it as a namespace-level policy. This can ensure that there is no need to do special processing on customized keywords in the future, and the expected

Re: [DISCUSS] Topic name restriction

2023-02-01 Thread Dave Fisher
Sent from my iPhone > On Feb 1, 2023, at 6:52 PM, Yong Zhang wrote: > > Mattison, > > I agree with you about restricting the topic name. > > How about using a blacklist way to restrict it? If we do then please call it by another name like “disallowed”. > > We can have a blacklist on

Re: [DISCUSS] Topic name restriction

2023-02-01 Thread Yunze Xu
The topic name character validation is already done by `NamedEntity#checkName`. And I agree that the system topic should be taken carefully as well. But I have a concern that whether we should treat all topics that start with the long underscore ("__") as system topics? Users might have defined

Re: [DISCUSS] Topic name restriction

2023-02-01 Thread Yong Zhang
Mattison, I agree with you about restricting the topic name. How about using a blacklist way to restrict it? We can have a blacklist on the topic name restriction and make it configurable. Add the keywords you mentioned in the default configuration. That would have a more general way to block a

[DISCUSS] Topic name restriction

2023-02-01 Thread mattisonchao
Hi, All In the current implementation, pulsar didn't support topic name restriction. It's a good chance to discuss it. I think this discussion aims to identify what types of topic names we all need to restrict. I know three topic names that need to be restricted at the moment. 1. The