Are topics in Google's cloud pub/sub case-sensitive? - case-sensitive

Simple question. Is
projects/myproject/topics/mytopic
The different from
projects/myproject/topics/MyTopic
MQTT are case-sensitive according to this:
Noticeable is that each topic must have at least 1 character to be valid and it can also contain spaces. Also a topic is case-sensitive, which makes myhome/temperature and MyHome/Temperature two individual topics. Additionally the forward slash alone is a valid topic, too.
But surprisingly I cannot find any information official or otherwise for Google's cloud pubsub

Yes, topics and subscriptions are all case sensitive.

Related

API REST format is correct?

I have a question about format of API REST
I have different API :
GET /api/payment/providers
GET /api/payment/recipients
GET /api/payment/rules
DELETE /api/payment/rules/{uuid}
PUT /api/payment/rules/{uuid}
POST /api/payment/rules
Is this format correct?
Or should I have something like that :
GET /api/paymentProviders
GET /api/paymentRecipients
GET /api/paymentRules
DELETE /api/paymentRules/{uuid}
PUT /api/paymentRules/{uuid}
POST /api/paymentRules
I heard that REST must respect this format:
Resource list / specific resource / sub-resource list / specific sub-resource / etc...
But, my format is correct or no?
Thanks!
TL;DR: your resource identifiers are fine as is.
I heard that REST must respect this format:
No.
You can use any spelling conventions you like for your resource identifiers.
RFC 3986 defines the production rules for URI, and HTTP Semantics defines a more restricted set of rules to follow when using the http/https URI scheme.
But neither of these put any semantic restrictions on the use of path segments.
Resource identifiers are similar to variable names - the machines don't care what spellings you use, so you can choose any spelling you like. The best spellings to use are those that are most convenient for the people you care most about.

What's the correct way to create an endpoint in a API REST

I'm drawing my API routes.
A user has projects, projects have actors, actors have addresses.
There is no address without an actor, there is no actor without a project, and there is no project without a user.
Would this be the correct way to build the end_point?
GET /users/{user_id}/projects/{project_id}/actors/{actor_id}/addresses
There is no such thing as a REST endpoint. There are resources. -- Fielding, 2018
What you seem to be asking about here is how to design the identifier for your resource.
REST doesn't care what spelling conventions you use for your resource identifiers, so long as they satisfy the production rules described by RFC 3986.
Identifiers that load data into the query part are convenient if you are expecting to leverage HTML forms:
GET /addresses?user={user_id}&project={project_id}&actor=actor_id
But that design is not particularly convenient if you are expecting to use dot segments to reference other resources.
Choosing some alternative that is described by a URI Template will make some things easier down the road.
/users/{user_id}/projects/{project_id}/actors/{actor_id}/addresses
That's fine. Other spellings would also be fine (hint: URL shorteners work).
Broadly, you choose identifier spellings by thinking about the different contexts in which a human being has to look at the URI (documentation for your API, browser histories, access logs, etc.) and choose a spelling that works well in at least one of those settings.

Special characters in document.location.href

Is it bad practice to make a page that has a web address like these:
http://example.com/-products-and-services.php
http://example.com/-contact-us.php
http://example.com/--books.php
http://example.com/--translation.php
http://example.com/--illustration.php
http://example.com/-$-special-feature.php
http://example.com/-$-vip-area.php
Will google or apache have problems with these (- $) characters?
I am doing this because I makes it easier for me to view and categorise pages while still letting me add keywords to the file names.
Thanks
You can use alphanumerics, and the special characters "$-_.+!*'()," in url.
But it may not be very helpful with seo, search engine indexing etc.
You can read what google says here,
https://support.google.com/webmasters/answer/76329?hl=en

LDAP Server Password Policy Apache DS and Open DS

I wonder if someone might be able to help us or offer some advice. We are a Java focused team, and are looking at extending our in house Authentication service, to offload most of the authentication , to use an LDAP server. That way we can simply use an out of the box password policy, which meets our criteria, plus we can use stuff such as replication etc. We are investigating which is the best free LDAP server to use.
So far we have investigated :
OpenLDAP (We found this is written in C, and documentation is not all that great).
Apache DS (We found this is good, but has a basic password policy. Mainly it does not seem to be extendable to fit one of our requirements (that the password policy should enforce mixed case characters, etc etc). This is surprising as the basic config options are ofcourse supported, eg. minimum length of password, maximum retries before being locked out etc etc.
Sun OpenDS (This fits all our needs, but no longer seems to be supported??. Please advise us if this assumption is wrong?It has great support for Password Validators, so that we can handle enforcement of mixed case passwords etc etc).
Oracle Unified Directory - This is the SUN DS server which is supprted. However, Oracle Unified Directory is not free unfortunately.
So, basically the question is 2 fold :
(1) Does anyone know how to extend the passowrd policy on Apache DS, such that we can support mixed case character enforcement. eg password must contain a mix of upper case and lower case chars aswell as atleast one digit etc etc. Or is this out of the box? I personally couldnt find any documentation on it?
(2) Does anyone know of any good and free LDAP servers that support this sort of stuff. Any ideas please?
Many Thanks,
R
After all of this, we finally found 389ds (ironically the last one we investigated). This we found was the best (for our needs anyway). The reason is that, it is has a great administration UI, does everything we need to do out of the box, plus, best of all, it is available in a costed option under RedHat. We didnt take the supported option, but nonetheless, as it is supported by RedHat, the documentation , we found was superb. Therefore, we felt confident that everything we needed to do wasexplained 100% rather than with some of the others, was half explained on some unmaintained wiki. So we advise all to look at 389ds.
I know ApacheDS doesn't support any extensions for ppolicy checks, can you file a feature request on ApacheDS's JIRA? We might try to get this included in the upcoming release.
I have filed this request https://issues.apache.org/jira/browse/DIRSERVER-1858
You should look at the http://forgerock.com/ OpenDJ which is an active and supported if you subscribe spin from OpenDS.
-jim

POP3 message format rfc

I'm currently coding, as the part of a bigger project, a webmail client.
I'd just need a quick reference and/or pointer towards the right direction about POP3 messages, as I'll have to parse them.
I don't want to use available libraries for this. I just need to know if there is something I can read to understand what to expect in a message.
Thanks!
[Precision Edit:] I'm really talking about a single message's syntax, here. There are "From" fields, and "To" fields, and many other fields, like Mime-Type and stuff, and I want to know if there is a doc somewhere that specifies what is sent back on a successful RETR command.
[Addendum] One might want to look up RFC 822 in addition to RFC 1939.
The RFC is here
And here's a java tutorial on the subject.