Hi Guys,
after migrating to Harbor 1.1.0 and configuring LDAP I am unable to login due to this error:
[ERROR] [ldap.go:309]: system register user failed, error: Error 1406: Data too long for column 'realname' at row 1
Apr 17 17:53:11 172.19.0.1 ui[20184]: 2017-04-17T15:53:11Z [ERROR] [ldap.go:97]: Can't import user , error: registe_user_error
Investigating the database, I saw that the realname is really short and should be much longer:
mysql > describe user;
+---------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+----------------+
| user_id | int(11) | NO | PRI | NULL | auto_increment |
| username | varchar(32) | YES | UNI | NULL | |
| email | varchar(255) | YES | UNI | NULL | |
| password | varchar(40) | NO | | NULL | |
| realname | varchar(20) | NO | | NULL | |
| comment | varchar(30) | YES | | NULL | |
| deleted | tinyint(1) | NO | | 0 | |
| reset_uuid | varchar(40) | YES | | NULL | |
| salt | varchar(40) | YES | | NULL | |
| sysadmin_flag | tinyint(1) | YES | | NULL | |
| creation_time | timestamp | YES | | NULL | |
| update_time | timestamp | YES | | NULL | |
+---------------+--------------+------+-----+---------+----------------+
In Spain, for example, we have several last names. Names with length 100 or more it's really common.
Regards,
Claudiu
Thanks Claudiu, I think it's a reasonable request. We'll make update for the schema, and provide migration script.
As for now, I assume you can work around this issue by extend the length of the column?
Yes, I can alter the table without problems.
Thank you!
FYI:
alter table user MODIFY realname VARCHAR (255) NOT NULL;
Hi again guys,
checking https://github.com/vmware/harbor/blob/master/tools/migration/changelog.md I don't see any change related with realname field. Will this field be updated in the next release? It's important for us.
Thanks,
Claudiu
This improvement is really important for us.
Many thanks.
I created a PR for this: #2570
close it as the PR has been merged.
Most helpful comment
FYI:
alter table user MODIFY realname VARCHAR (255) NOT NULL;